mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 05:28:07 +08:00
41183693b0
* feat(freebsd): add support native freebsd container images Fixes issue #1663 freebsd is now building and releasing official freebsd OCI container images https://hub.docker.com/r/freebsd/freebsd-runtime/tags Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * fix: add freebsd support in publish workflow Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * fix: bump stacker version Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * fix: disable non-functional darwin OCI image builds darwin OCI images are non-functional until we get a usable base image. Remove them. Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * fix: set freebsd-static as base image for FreeBSD images Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
# ---
|
|
# Stage 1: Install certs, build binary, create default config file
|
|
# ---
|
|
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.24 AS builder
|
|
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ARG COMMIT
|
|
|
|
RUN apt-get update && apt-get install -y git make ca-certificates
|
|
RUN mkdir -p /go/src/github.com/project-zot/zot
|
|
WORKDIR /go/src/github.com/project-zot/zot
|
|
COPY . .
|
|
RUN make COMMIT=$COMMIT OS=$TARGETOS ARCH=$TARGETARCH clean binary
|
|
RUN echo '# Default config file for zot server\n\
|
|
http:\n\
|
|
address: 0.0.0.0\n\
|
|
port: 5000\n\
|
|
storage:\n\
|
|
rootDirectory: /var/lib/registry\n\
|
|
gc: false\n\
|
|
dedupe: false' > config.yaml && cat config.yaml
|
|
|
|
# ---
|
|
# Stage 2: Final image with nothing but certs, binary, and default config file
|
|
# ---
|
|
ARG BASE_IMAGE
|
|
FROM $BASE_IMAGE AS final
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=builder /go/src/github.com/project-zot/zot/bin/zot-$TARGETOS-$TARGETARCH /usr/bin/zot
|
|
COPY --from=builder /go/src/github.com/project-zot/zot/config.json /etc/zot/config.json
|
|
ENTRYPOINT ["/usr/bin/zot"]
|
|
EXPOSE 5000
|
|
CMD ["serve", "/etc/zot/config.yaml"]
|