Skip to content

Commit

Permalink
Update agent.Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Moulali Shikalwadi <[email protected]>
  • Loading branch information
moulalis authored Oct 11, 2024
1 parent d953059 commit 9951c1f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions agent.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ RUN CGO_ENABLED=0 GOOS=linux GOFLAGS=-mod=mod go build -a -o agent ./cmd/agent
# Copy the inference-agent into a thin image
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

RUN microdnf install -y --disablerepo=* --enablerepo=ubi-8-baseos-rpms shadow-utils && \
microdnf clean all && \
useradd kserve -m -u 1000
RUN microdnf remove -y shadow-utils
RUN mkdir -p /home/kserve && \
touch /etc/passwd /etc/group /etc/shadow && \
echo 'kserve:x:1000:1000::/home/kserve:/bin/bash' >> /etc/passwd && \
echo 'kserve:*:18573:0:99999:7:::' >> /etc/shadow && \
echo 'kserve:x:1000:' >> /etc/group && \
chown -R 1000:1000 /home/kserve

COPY third_party/ third_party/
WORKDIR /ko-app
COPY --from=builder /go/src/github.com/kserve/kserve/agent /ko-app/
USER 1000:1000

ENTRYPOINT ["/ko-app/agent"]
ENTRYPOINT ["/ko-app/agent"]

0 comments on commit 9951c1f

Please sign in to comment.