Merge pull request #34 from koehn/master

Updated Dockerfile
This commit is contained in:
Matt Baer 2018-11-24 11:01:02 -05:00 committed by GitHub
commit bdcacbc632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
Dockerfile
.git

View File

@ -1,4 +1,4 @@
FROM golang:1.11.2-alpine3.8
FROM golang:1.11.2-alpine3.8 as build
RUN apk add --update nodejs nodejs-npm make git
RUN npm install -g less
@ -11,5 +11,22 @@ RUN make install
RUN make ui
RUN make deps
RUN mkdir /stage && \
cp -R /go/bin \
/go/src/app/templates \
/go/src/app/static \
/go/src/app/schema.sql \
/go/src/app/pages \
/go/src/app/keys \
/stage
FROM alpine:3.8
COPY --from=build --chown=daemon:daemon /stage /go
WORKDIR /go
VOLUME /go/keys
EXPOSE 8080
CMD ["writefreely"]
USER daemon
CMD ["bin/writefreely"]