-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.code
More file actions
42 lines (34 loc) · 1.12 KB
/
Copy pathDockerfile.code
File metadata and controls
42 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang:1.26-trixie as builder
RUN apt-get update && apt-get install -y git
COPY kin/ /kin/
RUN cd /kin/ && CGO_ENABLED=0 go build -ldflags="-s -w" -o kin .
COPY kas/ /kas/
RUN cd /kas/ && CGO_ENABLED=0 go build -ldflags="-s -w" -o kas .
COPY ssh/ /ssh/
RUN cd /ssh/ && CGO_ENABLED=0 go build -ldflags="-s -w" -o sshp .
RUN mkdir /app/ && mv /kin/kin /kas/kas /ssh/sshp /app/
# ARG BASE_IMAGE_TAG
# FROM ghcr.io/suisrc/webtop:base-${BASE_IMAGE_TAG}
FROM ghcr.io/suisrc/webtop:base-3.5.0
# set environment variables
ENV KAS_SSHD="0" \
KAS_VSCODE="1" \
VSCODE_WSC="/wsc" \
VSCODE_PORT="7080" \
VSCODE_HASH="vscode:latest" \
PROXY_HEADER_x_forwarded_port="443" \
PASSWORD="" \
PASSROOT="" \
GIT_USER_NAME="" \
GIT_USER_EMAIL="" \
GOROOT="/usr/local/golang" \
GOPATH="/root/.go" \
PATH="/usr/local/golang/bin:/root/.go/bin:${PATH}" \
USER="root"
# VSCODE_INIT 支持指定脚本: file:///usr/srv/vsinit.sh
COPY --from=builder /app/ /usr/bin/
COPY rootfs/ /
COPY srv/init.sh srv/vscode.sh /usr/srv/
COPY script/vscode.kas.ini /etc/kas.ini
ENTRYPOINT ["/usr/bin/kas", "-c"]
# EXPOSE 7080