-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (18 loc) · 714 Bytes
/
Dockerfile
File metadata and controls
24 lines (18 loc) · 714 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
FROM openeuler/openeuler:23.03 as BUILDER
RUN dnf update -y && \
dnf install -y golang && \
go env -w GOPROXY=https://goproxy.cn,direct
MAINTAINER zengchen1024<chenzeng765@gmail.com>
# build binary
WORKDIR /go/src/github.com/opensourceways/defect-manager
COPY . .
RUN GO111MODULE=on CGO_ENABLED=0 go build -a -o defect-manager .
# copy binary config and utils
FROM openeuler/openeuler:22.03
RUN dnf -y update && \
dnf in -y shadow && \
groupadd -g 1000 defect && \
useradd -u 1000 -g defect -s /bin/bash -m defect
USER defect
COPY --chown=defect --from=BUILDER /go/src/github.com/opensourceways/defect-manager/defect-manager /opt/app/defect-manager
ENTRYPOINT ["/opt/app/defect-manager"]