Initial commit

This commit is contained in:
dushixiang
2020-12-20 21:19:11 +08:00
commit e7f2773c77
77 changed files with 27866 additions and 0 deletions

29
Dockerfile Normal file
View File

@ -0,0 +1,29 @@
FROM golang:alpine as builder
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct
WORKDIR /app
COPY . .
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add gcc g++
RUN go env && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -ldflags '-linkmode external -extldflags "-static"' -o next_terminal main.go
FROM alpine:3.12.3
LABEL MAINTAINER="helloworld1024@foxmail.com"
WORKDIR /opt/next_terminal
COPY --from=builder /app/next_terminal ./
COPY --from=builder /app/next-terminal.yml ./
COPY --from=builder /app/web/build ./web/build
RUN touch next-terminal.db & chmod +x next_terminal
EXPOSE 8088
ENTRYPOINT ./next_terminal