-
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (18 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
22 lines (18 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:12 as NODE_BUILD
WORKDIR /go/src/github.com/88250/pipe/
ADD . /go/src/github.com/88250/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/88250/pipe/
COPY --from=NODE_BUILD /go/src/github.com/88250/pipe/ /go/src/github.com/88250/pipe/
ENV GO111MODULE=on
RUN apk add --no-cache gcc musl-dev git && go build -i -v
FROM alpine:latest
LABEL maintainer="Liang Ding<845765@qq.com>"
WORKDIR /opt/pipe/
COPY --from=GO_BUILD /go/src/github.com/88250/pipe/ /opt/pipe/
RUN apk add --no-cache ca-certificates tzdata
ENV TZ=Asia/Shanghai
EXPOSE 5897
ENTRYPOINT [ "/opt/pipe/pipe" ]