diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5c665e5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +rhcos-live.x86_64.iso diff --git a/Containerfile.api b/Containerfile.api index 795fd4c..78c3dca 100644 --- a/Containerfile.api +++ b/Containerfile.api @@ -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