mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 09:33:11 +00:00
Updated Dockerfile to produce smaller image with minimum content and a few extra features; added .dockerignore
This commit is contained in:
parent
bf5ed00484
commit
5039853edc
2 changed files with 18 additions and 1 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
Dockerfile
|
18
Dockerfile
18
Dockerfile
|
@ -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,21 @@ 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 && ls -l /stage
|
||||
|
||||
FROM golang:1.11.2-alpine3.8
|
||||
|
||||
COPY --from=build --chown=daemon:daemon /stage /go
|
||||
|
||||
VOLUME /go/keys
|
||||
EXPOSE 8080
|
||||
USER daemon
|
||||
|
||||
CMD ["writefreely"]
|
||||
|
|
Loading…
Reference in a new issue