You've already forked directdnsonly-go
Initial Commit.
This commit is contained in:
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
# Build Stage
|
||||
FROM lacion/alpine-golang-buildimage:1.13 AS build-stage
|
||||
|
||||
LABEL app="build-directdnsonly"
|
||||
LABEL REPO="https://github.com/guisea/directdnsonly"
|
||||
|
||||
ENV PROJPATH=/go/src/github.com/guisea/directdnsonly
|
||||
|
||||
# Because of https://github.com/docker/docker/issues/14914
|
||||
ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
|
||||
|
||||
ADD . /go/src/github.com/guisea/directdnsonly
|
||||
WORKDIR /go/src/github.com/guisea/directdnsonly
|
||||
|
||||
RUN make build-alpine
|
||||
|
||||
# Final Stage
|
||||
FROM lacion/alpine-base-image:latest
|
||||
|
||||
ARG GIT_COMMIT
|
||||
ARG VERSION
|
||||
LABEL REPO="https://github.com/guisea/directdnsonly"
|
||||
LABEL GIT_COMMIT=$GIT_COMMIT
|
||||
LABEL VERSION=$VERSION
|
||||
|
||||
# Because of https://github.com/docker/docker/issues/14914
|
||||
ENV PATH=$PATH:/opt/directdnsonly/bin
|
||||
|
||||
WORKDIR /opt/directdnsonly/bin
|
||||
|
||||
COPY --from=build-stage /go/src/github.com/guisea/directdnsonly/bin/directdnsonly /opt/directdnsonly/bin/
|
||||
RUN chmod +x /opt/directdnsonly/bin/directdnsonly
|
||||
|
||||
# Create appuser
|
||||
RUN adduser -D -g '' directdnsonly
|
||||
USER directdnsonly
|
||||
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
||||
CMD ["/opt/directdnsonly/bin/directdnsonly"]
|
||||
Reference in New Issue
Block a user