commit 1a13d990aafb1bc13a4c21aa7df2d5be1b5190e0 parent 9cbf2e5d15cb90b5a365c8914ac3ed69a36922b3 Author: Vetle Haflan <vetle@haflan.dev> Date: Tue, 10 Mar 2020 20:52:27 +0100 Add Dockerfile and gitlab-ci.yml for basic image build Limitation: No environment variables, so no opts can be given to vodkas Diffstat:
A | .gitlab-ci.yml | | | 6 | ++++++ |
A | Dockerfile | | | 13 | +++++++++++++ |
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -0,0 +1,6 @@ +build_image: + script: + - docker build -t d.haflan.dev/general/vodkas:latest . + - docker push d.haflan.dev/general/vodkas + only: + - master diff --git a/Dockerfile b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:alpine +WORKDIR /app +COPY . /app +RUN apk add git +RUN go get -d ./... ; \ + go build -o vodkas ; + #go test + +FROM alpine:latest +WORKDIR /root/ +COPY --from=0 /app/vodkas . +EXPOSE 8080 +CMD ["/root/vodkas"]