-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dind
More file actions
64 lines (37 loc) · 1.05 KB
/
Dockerfile.dind
File metadata and controls
64 lines (37 loc) · 1.05 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Builder
FROM --platform=$BUILDPLATFORM whatwewant/builder-go:v1.22-1 as builder
WORKDIR /build
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . .
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
go build \
-trimpath \
-ldflags '-w -s -buildid=' \
-v -o gzcaas
# Server
FROM whatwewant/dind:v24-1
LABEL MAINTAINER="Zero<tobewhatwewant@gmail.com>"
LABEL org.opencontainers.image.source="https://github.com/go-zoox/gzcaas"
ENV DEBIAN_FRONTEND=noninteractive
RUN zmicro update -a && apt update -y
RUN zmicro package install rsync
RUN DEBIAN_FRONTEND=noninteractive TZ=Asia/Shanghai zmicro package install ossfs
RUN zmicro package install kubectl
RUN zmicro package install helm
RUN zmicro package install pipeline
RUN zmicro fn pm::npm i -g zx
ENV MODE=production
EXPOSE 8838
RUN zmicro plugin install eunomia@v1.20.42
COPY entrypoint.sh /entrypoint.sh
COPY --from=builder /build/gzcaas /bin
# Remove the origin entrypoint
ENTRYPOINT []
ENV TZ=Asia/Shanghai HOME=/root
CMD /entrypoint.sh