Skip to content

Commit

Permalink
add builder on docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed May 21, 2024
1 parent 2ec9457 commit 03c5e38
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM golang:1.22.3-bookworm AS builder
WORKDIR /app
RUN git clone https://github.com/fujiwara/aws-sdk-client-go.git .
RUN rm -f gen.yaml
ENTRYPOINT ["./build-in-docker.sh"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := $(shell git describe --abbrev=0 --tags)
VERSION := $(shell git describe --tags)
.PHONY: clean test gen

build: gen aws-sdk-client-go
Expand Down
12 changes: 12 additions & 0 deletions build-in-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
git pull
if [[ $GIT_REF != "" ]]; then
git checkout --detach $GIT_REF
fi
make clean
make
echo 'Completed. Please extract /app/aws-sdk-client-go from this container!'
echo 'For example, run the following command:'
echo 'docker cp $(docker ps -lq):/app/aws-sdk-client-go .'
echo ''

0 comments on commit 03c5e38

Please sign in to comment.