debian-forge-composer/distribution/Dockerfile-ubi
Ondřej Budai c0df932fc6 Dockerfile: bump the shutdown period to 15 seconds
5 seconds didn't fully help with the issue, let's try 15 and see what happens.

See https://github.com/osbuild/osbuild-composer/pull/2797#issuecomment-1172862359
for more details.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-07-07 15:33:32 +02:00

26 lines
1.1 KiB
Text

FROM registry.access.redhat.com/ubi8/go-toolset:latest AS builder
COPY . .
ENV GOFLAGS=-mod=vendor
RUN go install ./cmd/osbuild-composer/
FROM registry.access.redhat.com/ubi8/go-toolset:latest AS builder2
RUN go get -u github.com/jackc/tern
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
RUN microdnf install python3 python3-dnf
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/"
RUN mkdir -p "/usr/share/osbuild-composer/"
RUN mkdir -p "/opt/migrate/"
COPY --from=builder /opt/app-root/src/go/bin/osbuild-composer /usr/libexec/osbuild-composer/
COPY ./containers/osbuild-composer/entrypoint.py /opt/entrypoint.py
COPY ./dnf-json /usr/libexec/osbuild-composer/
COPY ./pkg/jobqueue/dbjobqueue/schemas /opt/migrate/schemas
COPY --from=builder2 /opt/app-root/src/go/bin/tern /opt/migrate/
EXPOSE 8080 8700
ENTRYPOINT ["python3", "/opt/entrypoint.py", "--remote-worker-api", "--composer-api", "--shutdown-wait-period", "15"]