Skip to content

Commit 864bd64

Browse files
committed
Fix docker image
1 parent 158c94f commit 864bd64

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.circleci/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
version: 20.10.18
8787
- run: |
8888
for cmd in << pipeline.parameters.cmds >>; do
89-
docker build -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:latest .
89+
docker build --build-arg cmd=${cmd} -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:latest .
9090
done
9191
9292
publish_docker:
@@ -102,7 +102,7 @@ jobs:
102102
TAG=${CIRCLE_TAG:1}
103103
TAG=${TAG:-latest}
104104
for cmd in << pipeline.parameters.cmds >>; do
105-
docker build -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:${TAG} .
105+
docker build --build-arg cmd=${cmd} -f ./cmd/${cmd}/Dockerfile -t robocupssl/${cmd}:${TAG} .
106106
docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"
107107
docker push robocupssl/${cmd}:${TAG}
108108
done
@@ -127,7 +127,8 @@ workflows:
127127
filters: { branches: { ignore: /.*/ }, tags: { only: /^v.*/ } }
128128
docker:
129129
jobs:
130-
- build_docker
130+
- build_docker:
131+
filters: { branches: { ignore: master } }
131132
- publish_docker:
132133
context: docker hub
133134
filters: { branches: { only: master }, tags: { only: /^v.*/ } }

cmd/ssl-game-controller/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ARG cmd=ssl-game-controller
99
WORKDIR work
1010
COPY . .
1111
COPY --from=build_node frontend/dist frontend/dist
12-
RUN go install -v ./cmd/${cmd}
12+
RUN go install ./cmd/${cmd}
1313

1414
# Start fresh from a smaller image
1515
FROM alpine:3
16-
ARG cmd
16+
ARG cmd=ssl-game-controller
1717
COPY --from=build_go /go/bin/${cmd} /app/${cmd}
1818
RUN mkdir -p config && chown -R 1000: config
1919
USER 1000

cmd/ssl-ref-client/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN go install -v ./cmd/${cmd}
66

77
# Start fresh from a smaller image
88
FROM alpine:3
9-
ARG cmd
9+
ARG cmd=ssl-ref-client
1010
COPY --from=build_go /go/bin/${cmd} /app/${cmd}
1111
USER 1000
1212
ENV COMMAND="/app/${cmd}"

0 commit comments

Comments
 (0)