-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (36 loc) · 1003 Bytes
/
Dockerfile
File metadata and controls
61 lines (36 loc) · 1003 Bytes
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
# 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/zmicro:v1.24
LABEL MAINTAINER="Zero<tobewhatwewant@gmail.com>"
LABEL org.opencontainers.image.source="https://github.com/go-zoox/gzcaas"
RUN zmicro update -a && apt update -y
RUN zmicro package install rsync
RUN 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
RUN zmicro plugin install eunomia@v1.20.42
COPY entrypoint.sh /entrypoint.sh
COPY --from=builder /build/gzcaas /bin
# Remove the origin entrypoint
# ENTRYPOINT []
# CMD /entrypoint.sh
ENV TZ=Asia/Shanghai HOME=/root
CMD gzcaas server