1
0

CI/CD: Patch the companion's Dockerfile for tests

This commit is contained in:
Nicolas Duchon 2020-12-23 19:15:11 +01:00
parent 3d35839f31
commit 3ac0f260e9
No known key found for this signature in database
GPG Key ID: 91EF7BB1EECB961A
2 changed files with 6 additions and 3 deletions

View File

@ -24,6 +24,10 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Patch the Dockerfile's docker-gen
run: |
sed -i 's#DOCKER_GEN_VERSION=.*$#DOCKER_GEN_VERSION=fix-current-container-id#g' Dockerfile
sed -i 's#go get github.com/jwilder/docker-gen#go get github.com/buchdag/docker-gen \&\& mv /go/src/github.com/buchdag /go/src/github.com/jwilder#g' Dockerfile
- name: Build Image
run: docker build -t "$IMAGE" .
- name: Inspect Image

View File

@ -1,6 +1,6 @@
FROM golang:1.15-alpine AS go-builder
ENV DOCKER_GEN_VERSION=fix-current-container-id
ENV DOCKER_GEN_VERSION=0.7.4
# Build docker-gen
RUN apk add --no-cache --virtual .build-deps \
@ -9,8 +9,7 @@ RUN apk add --no-cache --virtual .build-deps \
git \
make \
musl-dev \
&& go get github.com/buchdag/docker-gen \
&& mv /go/src/github.com/buchdag /go/src/github.com/jwilder \
&& go get github.com/jwilder/docker-gen \
&& cd /go/src/github.com/jwilder/docker-gen \
&& git -c advice.detachedHead=false checkout $DOCKER_GEN_VERSION \
&& make get-deps \