From 9c90cf07e9ca1374281b9641cc9033b6c3a6121a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Budnik?= Date: Thu, 4 Feb 2021 08:05:34 +0100 Subject: [PATCH] single Dockerfile for testing and official builds --- .github/workflows/docker-image.yml | 2 +- Dockerfile | 3 +-- TestDockerfile | 15 --------------- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 TestDockerfile diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f97283e..ced56c0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,4 +15,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the Docker image - run: docker build . --file TestDockerfile --tag yosoy-local:$(date +%s) + run: docker build . --file Dockerfile --tag yosoy-local:$(date +%s) diff --git a/Dockerfile b/Dockerfile index c9f0e8b..c2c8a93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ FROM golang:1.15.7-alpine3.13 as builder LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com" # build yosoy -RUN apk --update add git -RUN git clone https://github.com/lukaszbudnik/yosoy.git +ADD . /go/yosoy RUN cd /go/yosoy && go build FROM alpine:3.13 diff --git a/TestDockerfile b/TestDockerfile deleted file mode 100644 index c2c8a93..0000000 --- a/TestDockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM golang:1.15.7-alpine3.13 as builder - -LABEL maintainer="Łukasz Budnik lukasz.budnik@gmail.com" - -# build yosoy -ADD . /go/yosoy -RUN cd /go/yosoy && go build - -FROM alpine:3.13 -COPY --from=builder /go/yosoy/yosoy /bin - -# register entrypoint -ENTRYPOINT ["yosoy"] - -EXPOSE 80