cabinet/docker/Dockerfile

34 lines
754 B
Docker
Raw Permalink Normal View History

FROM golang:alpine
2019-11-17 16:51:44 +00:00
RUN apk add --no-cache git
RUN apk add --no-cache musl-dev
RUN apk add --no-cache gcc
RUN apk add --no-cache sqlite
RUN apk add --no-cache go
RUN apk add --no-cache make
RUN apk add --no-cache npm
RUN apk add --no-cache yarn
VOLUME /app/var
EXPOSE 5673
ARG gomaxprocs="8"
WORKDIR /app
ENV SRC_DIR=/app/src/
ENV GOMAXPROCS=${gomaxprocs}
RUN git clone https://code.chrissexton.org/cws/cabinet.git $SRC_DIR
RUN apk add --no-cache tzdata
ENV TZ America/New_York
# RUN yarn global add @vue/cli
RUN cd $SRC_DIR/frontend; yarn && yarn build
RUN go get -u github.com/mjibson/esc
RUN cd $SRC_DIR; go generate && go get ./... && go build -o /app/cabinet
2019-11-17 16:51:44 +00:00
ENTRYPOINT ["/app/cabinet", "-httpAddr=0.0.0.0:5673", "-db=/app/var/cabinet.db"]