29 lines
688 B
Docker
29 lines
688 B
Docker
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 guacamole/guacd:1.2.0
|
|
|
|
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 |