Explorar o código

feature: Docker ce (#536)

James Read hai 1 ano
pai
achega
486253b253
Modificáronse 2 ficheiros con 31 adicións e 5 borrados
  1. 15 2
      Dockerfile
  2. 16 3
      Dockerfile.arm64

+ 15 - 2
Dockerfile

@@ -1,7 +1,13 @@
+FROM --platform=linux/amd64 registry.fedoraproject.org/fedora-minimal:40-x86_64 AS olivetin-tmputils
+
+RUN microdnf -y install dnf-plugins-core && \
+	dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo && \
+	microdnf install -y docker-ce-cli docker-compose-plugin && microdnf clean all
+
 FROM --platform=linux/amd64 registry.fedoraproject.org/fedora-minimal:40-x86_64
 
 LABEL org.opencontainers.image.source https://github.com/OliveTin/OliveTin
-LABEL org.opencontainers.image.title=OliveTin
+LABEL org.opencontainers.image.title OliveTin
 
 RUN mkdir -p /config /config/entities/ /var/www/olivetin \
     && \
@@ -12,9 +18,16 @@ RUN mkdir -p /config /config/entities/ /var/www/olivetin \
 		apprise \
 		jq \
 		git \
-		docker \
 	&& microdnf clean all
 
+COPY --from=olivetin-tmputils \
+	/usr/bin/docker \
+	/usr/bin/docker
+
+COPY --from=olivetin-tmputils \
+	/usr/libexec/docker/cli-plugins/docker-compose \
+	/usr/libexec/docker/cli-plugins/docker-compose
+
 RUN useradd --system --create-home olivetin -u 1000
 
 EXPOSE 1337/tcp

+ 16 - 3
Dockerfile.arm64

@@ -1,20 +1,33 @@
+FROM --platform=linux/arm64 registry.fedoraproject.org/fedora-minimal:40-aarch64 AS olivetin-tmputils
+
+RUN microdnf -y install dnf-plugins-core && \
+	dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo && \
+	microdnf install -y docker-ce-cli docker-compose-plugin && microdnf clean all
+
 FROM --platform=linux/arm64 registry.fedoraproject.org/fedora-minimal:40-aarch64
 
 LABEL org.opencontainers.image.source https://github.com/OliveTin/OliveTin
-LABEL org.opencontainers.image.title=OliveTin
+LABEL org.opencontainers.image.title OliveTin
 
 RUN mkdir -p /config /config/entities/ /var/www/olivetin \
     && \
-    microdnf install -y --nodocs --noplugins --setopt=keepcache=0 --setopt=install_weak_deps=0 \
+	microdnf install -y --nodocs --noplugins --setopt=keepcache=0 --setopt=install_weak_deps=0 \
 		iputils \
 		openssh-clients \
 		shadow-utils \
 		apprise \
 		jq \
 		git \
-		docker \
 	&& microdnf clean all
 
+COPY --from=olivetin-tmputils \
+	/usr/bin/docker \
+	/usr/bin/docker
+
+COPY --from=olivetin-tmputils \
+	/usr/libexec/docker/cli-plugins/docker-compose \
+	/usr/libexec/docker/cli-plugins/docker-compose
+
 RUN useradd --system --create-home olivetin -u 1000
 
 EXPOSE 1337/tcp