forked from b3log/pipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (18 loc) · 819 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:10.15.3 as NODE_BUILD
WORKDIR /go/src/github.com/b3log/pipe/
ADD . /go/src/github.com/b3log/pipe/
RUN cd console && npm install && npm run build && cd ../theme && npm install && npm run build && \
rm -rf node_modules && cd ../console && rm -rf node_modules
FROM golang:alpine as GO_BUILD
WORKDIR /go/src/github.com/b3log/pipe/
COPY --from=NODE_BUILD /go/src/github.com/b3log/pipe/ /go/src/github.com/b3log/pipe/
RUN apk add --no-cache gcc musl-dev && go build -i -v
FROM alpine:latest
LABEL maintainer="Liang Ding<[email protected]>"
WORKDIR /opt/pipe
COPY --from=GO_BUILD /go/src/github.com/b3log/pipe/ /opt/pipe/
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone \
&& apk add --no-cache ca-certificates
EXPOSE 5897
ENTRYPOINT [ "/opt/pipe/pipe" ]