Skip to content

Commit

Permalink
Keep ISO only in last ctr layer
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Machacek <[email protected]>
  • Loading branch information
machacekondra committed Oct 24, 2024
1 parent aec6684 commit b842aee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rhcos-live.x86_64.iso
5 changes: 2 additions & 3 deletions Containerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ RUN go mod download
COPY . .

USER 0
RUN curl -Lo /app/rhcos-live.x86_64.iso https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/rhcos-live.x86_64.iso
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs=false -o /planner-api cmd/planner-api/main.go

FROM registry.access.redhat.com/ubi9/ubi-micro
FROM registry.access.redhat.com/ubi9/ubi-minimal

WORKDIR /app

RUN curl -Lo /app/rhcos-live.x86_64.iso https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/rhcos-live.x86_64.iso
COPY /data /app/data/
COPY --from=builder /planner-api /app/
COPY --from=builder /app/rhcos-live.x86_64.iso /app/

# Use non-root user
RUN chown -R 1001:0 /app
Expand Down

0 comments on commit b842aee

Please sign in to comment.