4
0

Dockerfile.multiarches 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Multi-arch Dockerfile for GoReleaser (dockers_v2).
  2. # Base image :43 is used without arch suffix so the registry can supply the right
  3. # platform (manifest list). TARGETPLATFORM is set by BuildKit for COPY.
  4. # For custom/local single-arch builds, use Dockerfile.singlearch instead.
  5. ARG TARGETPLATFORM
  6. FROM registry.fedoraproject.org/fedora-minimal:43 AS olivetin-tmputils
  7. RUN microdnf -y install dnf-plugins-core && \
  8. dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo && \
  9. microdnf install -y docker-ce-cli docker-compose-plugin && microdnf clean all
  10. FROM registry.fedoraproject.org/fedora-minimal:43
  11. LABEL org.opencontainers.image.source https://github.com/OliveTin/OliveTin
  12. LABEL org.opencontainers.image.title OliveTin
  13. RUN mkdir -p /config /config/entities/ /var/www/olivetin \
  14. && \
  15. microdnf install -y --nodocs --noplugins --setopt=keepcache=0 --setopt=install_weak_deps=0 \
  16. iputils \
  17. openssh-clients \
  18. kubernetes-client \
  19. shadow-utils \
  20. apprise \
  21. jq \
  22. git \
  23. && microdnf clean all
  24. COPY --from=olivetin-tmputils \
  25. /usr/bin/docker \
  26. /usr/bin/docker
  27. COPY --from=olivetin-tmputils \
  28. /usr/libexec/docker/cli-plugins/docker-compose \
  29. /usr/libexec/docker/cli-plugins/docker-compose
  30. RUN useradd --system --create-home olivetin -u 1000
  31. EXPOSE 1337/tcp
  32. COPY config.yaml /config
  33. COPY var/entities/* /config/entities/
  34. VOLUME /config
  35. ARG TARGETPLATFORM
  36. COPY $TARGETPLATFORM/OliveTin /usr/bin/OliveTin
  37. COPY webui /var/www/olivetin/
  38. COPY var/helper-actions/* /usr/bin/
  39. USER olivetin
  40. ENTRYPOINT [ "/usr/bin/OliveTin" ]