Created
October 6, 2019 14:22
-
-
Save mdouchement/d54134613873455c6ab233c31b08c096 to your computer and use it in GitHub Desktop.
Custom Dockerfile for github.com/root-gg/plik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build stage | |
FROM golang:1.13-alpine as build-env | |
MAINTAINER mdouchement | |
# Set the locale | |
ENV LANG c.UTF-8 | |
# Install build dependencies | |
RUN apk upgrade | |
RUN apk add --update --no-cache \ | |
ca-certificates \ | |
bash \ | |
git \ | |
build-base \ | |
nodejs \ | |
nodejs-npm | |
RUN git clone https://github.com/root-gg/plik.git /go/src/github.com/root-gg/plik | |
WORKDIR /go/src/github.com/root-gg/plik | |
RUN make frontend | |
RUN make server | |
# final stage | |
FROM alpine | |
MAINTAINER mdouchement | |
RUN apk add --update --no-cache shadow ca-certificates | |
RUN useradd -d /opt/plik -m plik | |
USER plik | |
WORKDIR /opt/plik | |
COPY --from=build-env --chown=plik /go/src/github.com/root-gg/plik/server/public /opt/plik/public | |
COPY --from=build-env --chown=plik /go/src/github.com/root-gg/plik/server/plikd /opt/plik/server/plikd | |
COPY --from=build-env --chown=plik /go/src/github.com/root-gg/plik/server/plikd.cfg /opt/plik/plikd.cfg | |
EXPOSE 8080 | |
CMD ["/opt/plik/server/plikd"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment