dockerfile: Second image for worker

Worker container image. Follows the same general structure as the
composer image
This commit is contained in:
Achilleas Koutsou 2021-01-04 13:38:14 +01:00 committed by Tom Gundersen
parent 937911feac
commit 172cd4f816

View file

@ -0,0 +1,15 @@
FROM registry.access.redhat.com/ubi8/go-toolset:latest AS builder
COPY . .
ENV GOFLAGS=-mod=vendor
RUN go install ./cmd/osbuild-worker
FROM fedora
RUN dnf install -y qemu-img osbuild osbuild-ostree
RUN mkdir -p "/usr/libexec/osbuild-composer"
RUN mkdir -p "/etc/osbuild-composer/"
RUN mkdir -p "/run/osbuild-composer/"
RUN mkdir -p "/var/cache/osbuild-composer/"
RUN mkdir -p "/var/lib/osbuild-composer/"
COPY --from=builder /opt/app-root/src/go/bin/osbuild-worker /usr/libexec/osbuild-composer/
ENTRYPOINT ["/usr/libexec/osbuild-composer/osbuild-worker"]