fix: build web UI before container images
This commit is contained in:
parent
dc64d53e26
commit
b2c73491da
|
|
@ -1,40 +1,32 @@
|
|||
# Multi-arch Dockerfile for GoReleaser (dockers_v2).
|
||||
# Base image :44 is used without arch suffix so the registry can supply the right
|
||||
# platform (manifest list). TARGETPLATFORM is set by BuildKit for COPY.
|
||||
# TARGETPLATFORM is set by BuildKit for COPY.
|
||||
# For custom/local single-arch builds, use Dockerfile.singlearch instead.
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
FROM registry.fedoraproject.org/fedora-minimal:44 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 registry.fedoraproject.org/fedora-minimal:44
|
||||
FROM debian:13-slim
|
||||
|
||||
LABEL org.opencontainers.image.source https://github.com/OliveTin/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 \
|
||||
iputils \
|
||||
openssh-clients \
|
||||
kubernetes-client \
|
||||
shadow-utils \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apprise \
|
||||
jq \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
&& 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
|
||||
iputils-ping \
|
||||
jq \
|
||||
openssh-client \
|
||||
passwd \
|
||||
&& install -m 0755 -d /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
|
||||
&& chmod a+r /etc/apt/keyrings/docker.asc \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd --system --create-home olivetin -u 1000
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +1,26 @@
|
|||
FROM --platform=linux/amd64 registry.fedoraproject.org/fedora-minimal:44-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:44-x86_64
|
||||
FROM --platform=linux/amd64 debian:13-slim
|
||||
|
||||
LABEL org.opencontainers.image.source https://github.com/OliveTin/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 \
|
||||
iputils \
|
||||
openssh-clients \
|
||||
kubernetes-client \
|
||||
shadow-utils \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apprise \
|
||||
jq \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
&& 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
|
||||
iputils-ping \
|
||||
jq \
|
||||
openssh-client \
|
||||
passwd \
|
||||
&& install -m 0755 -d /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
|
||||
&& chmod a+r /etc/apt/keyrings/docker.asc \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd --system --create-home olivetin -u 1000
|
||||
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -39,7 +39,7 @@ dist:
|
|||
echo "dist noop"
|
||||
|
||||
|
||||
podman-image:
|
||||
podman-image: webui-dist
|
||||
buildah bud -f Dockerfile.singlearch -t olivetin
|
||||
|
||||
podman-container:
|
||||
|
|
@ -48,7 +48,7 @@ podman-container:
|
|||
podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
|
||||
podman start olivetin
|
||||
|
||||
integration-tests-docker-image:
|
||||
integration-tests-docker-image: webui-dist
|
||||
docker rm -f olivetin && docker rmi -f olivetin
|
||||
docker build -f Dockerfile.singlearch -t olivetin:latest .
|
||||
docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
|
||||
|
|
|
|||
Loading…
Reference in New Issue