Try different Dockerfile
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-12-16 22:03:33 +01:00
parent 0e85cae03d
commit e30046cadd
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 15 additions and 9 deletions

View File

@ -10,8 +10,6 @@ pipeline:
repo: registry.stuifzandapp.com/microsub-server
registry: registry.stuifzandapp.com
secrets: [ docker_username, docker_password ]
settings:
dockerfile: ./Dockerfile.alpine
deploy:
image: appleboy/drone-ssh

View File

@ -1,8 +1,16 @@
FROM ubuntu
RUN apt-get -y update && apt-get install -y ca-certificates
RUN ["mkdir", "/usr/share/eksterd"]
ADD ./eksterd /usr/local/bin
ADD ./templates /usr/share/eksterd
# build stage
FROM golang:1.10.2-alpine3.7 AS build-env
RUN apk --no-cache add git
RUN go get p83.nl/go/ekster/...
# final stage
FROM alpine
RUN apk --no-cache add ca-certificates
RUN ["mkdir", "-p", "/opt/micropub"]
WORKDIR /opt/micropub
EXPOSE 80
ENV EKSTER_TEMPLATES "/usr/share/eksterd"
ENTRYPOINT ["/usr/local/bin/eksterd"]
COPY --from=build-env /go/bin/eksterd /app/
RUN ["mkdir", "/app/templates"]
COPY --from=build-env /go/src/p83.nl/go/ekster/templates /app/templates
ENTRYPOINT ["/app/eksterd"]