34 lines
754 B
Docker
34 lines
754 B
Docker
FROM golang:alpine
|
|
|
|
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
|
|
|
|
ENTRYPOINT ["/app/cabinet", "-httpAddr=0.0.0.0:5673", "-db=/app/var/cabinet.db"]
|