diff --git a/docker-compose.yaml b/docker-compose.yaml index c98bf3d..2001a1b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -135,7 +135,17 @@ services: config: container_name: olivetin - image: jamesread/olivetin + image: ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin + build: + context: . + dockerfile: docker/Dockerfile + tags: + - ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin + target: olivetin + x-bake: + platforms: + - linux/arm64 + - linux/amd64 user: root volumes: - ./config/olivetin.yaml:/config/config.yaml # replace host path or volume as needed diff --git a/docker/Dockerfile b/docker/Dockerfile index 6201c34..1e90e40 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -85,4 +85,40 @@ RUN source /bot_mini_ws/install/setup.bash \ # Set up the entrypoint ENTRYPOINT [ "/entrypoint.sh" ] -LABEL org.opencontainers.image.source=https://github.com/bjoernellens1/cps_loki \ No newline at end of file +LABEL org.opencontainers.image.source=https://github.com/bjoernellens1/cps_loki + +############################################# +# OliveTin Build # +############################################# +FROM registry.fedoraproject.org/fedora-minimal:39 AS olivetin + +LABEL org.opencontainers.image.source https://github.com/OliveTin/OliveTin +LABEL org.opencontainers.image.title=OliveTin + +# Making sure there is newest docker version installed +RUN dnf -y install dnf-plugins-core \ + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo \ + dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +RUN mkdir -p /config /var/www/olivetin \ + && dnf install -y --nodocs --noplugins --setopt=keepcache=0 --setopt=install_weak_deps=0 \ + iputils \ + openssh-clients \ + shadow-utils \ + && dnf clean all + +RUN useradd --system --create-home olivetin -u 1000 + +EXPOSE 1337/tcp + +VOLUME /config + +COPY OliveTin /usr/bin/OliveTin +COPY webui /var/www/olivetin/ + +USER olivetin + +ENTRYPOINT [ "/usr/bin/OliveTin" ] + + +