Skip to content

Commit f57cfe2

Browse files
committed
glib2.29
1 parent a897de2 commit f57cfe2

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

Dockerfile.ubi8 Dockerfile.ubi9

+7-20
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
11
FROM golang AS builder
2-
WORKDIR /go/src/github.com/ugol/jr
3-
COPY . .
4-
RUN go get -u -d -v
5-
RUN CGO_ENABLED=1 GOOS=linux go build -tags static_all -v -ldflags="-X 'github.com/ugol/jr/cmd.Version=${VERSION}' -X 'github.com/ugol/jr/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/cmd.BuildTime=${TIME}'" -o build/jr jr.go
6-
7-
FROM registry.access.redhat.com/ubi8/ubi-minimal
82
MAINTAINER Ugo Landini <[email protected]>
93

104
ARG VERSION=0.2.0
115
ARG USER=$(id -u -n)
126
ARG TIME=$(date)
137

14-
ENV BUILD_DEPS zlib zstd lz4 openssl curl
15-
16-
RUN microdnf install -y git \
17-
&& microdnf install -y ca-certificates \
18-
&& microdnf install -y gcc \
19-
&& microdnf install -y $BUILD_DEPS \
20-
&& microdnf clean all
8+
WORKDIR /go/src/github.com/ugol/jr
9+
COPY . .
10+
RUN go get -u -d -v
11+
RUN CGO_ENABLED=1 GOOS=linux go build -tags static_all -v -ldflags="-X 'github.com/ugol/jr/cmd.Version=${VERSION}' -X 'github.com/ugol/jr/cmd.BuildUser=${USER}' -X 'github.com/ugol/jr/cmd.BuildTime=${TIME}'" -o build/jr jr.go
2112

22-
RUN adduser \
23-
--home-dir "/home/jr" \
24-
--shell "/bin/sh" \
25-
--uid "100001" \
26-
"jr-user"
13+
FROM registry.access.redhat.com/ubi9/ubi-minimal
14+
15+
RUN mkdir /home/jr
2716

2817
COPY --from=builder /etc/passwd /etc/passwd
2918
COPY --from=builder /etc/group /etc/group
3019
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3120
COPY --from=builder /go/src/github.com/ugol/jr/templates/ /home/jr/.jr/templates/
3221
COPY --from=builder /go/src/github.com/ugol/jr/producers/kafka/*.examples /home/jr/.jr/kafka/
3322
COPY --from=builder /go/src/github.com/ugol/jr/build/jr /bin
34-
35-
USER jr-user:jr-user

0 commit comments

Comments
 (0)