Skip to content

Commit 9951c1f

Browse files
authored
Update agent.Dockerfile
Signed-off-by: Moulali Shikalwadi <[email protected]>
1 parent d953059 commit 9951c1f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

agent.Dockerfile

+8-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ RUN CGO_ENABLED=0 GOOS=linux GOFLAGS=-mod=mod go build -a -o agent ./cmd/agent
1717
# Copy the inference-agent into a thin image
1818
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
1919

20-
RUN microdnf install -y --disablerepo=* --enablerepo=ubi-8-baseos-rpms shadow-utils && \
21-
microdnf clean all && \
22-
useradd kserve -m -u 1000
23-
RUN microdnf remove -y shadow-utils
20+
RUN mkdir -p /home/kserve && \
21+
touch /etc/passwd /etc/group /etc/shadow && \
22+
echo 'kserve:x:1000:1000::/home/kserve:/bin/bash' >> /etc/passwd && \
23+
echo 'kserve:*:18573:0:99999:7:::' >> /etc/shadow && \
24+
echo 'kserve:x:1000:' >> /etc/group && \
25+
chown -R 1000:1000 /home/kserve
26+
2427
COPY third_party/ third_party/
2528
WORKDIR /ko-app
2629
COPY --from=builder /go/src/github.com/kserve/kserve/agent /ko-app/
2730
USER 1000:1000
2831

29-
ENTRYPOINT ["/ko-app/agent"]
32+
ENTRYPOINT ["/ko-app/agent"]

0 commit comments

Comments
 (0)