diff --git a/Dockerfile b/Dockerfile index bb8be1e..8be5453 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,6 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ apt update && apt install -y nodejs -# kubectl -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \ - chmod +x ./kubectl && \ - mv ./kubectl /usr/bin/kubectl - # laconic-so RUN curl -LO https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so && \ chmod +x ./laconic-so && \ @@ -25,8 +20,16 @@ RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm npm install -g @cerc-io/laconic-registry-cli && \ npm install -g yarn -# symlink podman to docker -RUN ln -s $(which podman) $(dirname `which podman`)/docker +# docker-static (needed because of a bug with 'podman manifest' +ARG DOCKER_VER=25.0.3 +WORKDIR /tmp +RUN curl -LO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VER}.tgz && \ + tar zxvf docker-${DOCKER_VER}.tgz docker/docker && \ + mv docker/docker /usr/local/bin/docker-static && \ + rm -rf docker-${DOCKER_VER}.tgz docker + +# Include our docker script. +COPY docker-wrapper.sh /usr/bin/docker RUN mkdir -p /srv && mkdir -p /app diff --git a/docker-wrapper.sh b/docker-wrapper.sh new file mode 100755 index 0000000..e9759ae --- /dev/null +++ b/docker-wrapper.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +PODMAN_BIN="/usr/bin/podman" +DOCKER_BIN="/usr/local/bin/docker-static" + +if [[ "$1" == "manifest" ]]; then + $DOCKER_BIN $* +elif [[ "$1" == "login" ]]; then + $DOCKER_BIN $* + $PODMAN_BIN $* +else + $PODMAN_BIN $* +fi diff --git a/run.sh b/run.sh index 2a5f1c0..b39a5f0 100755 --- a/run.sh +++ b/run.sh @@ -91,7 +91,7 @@ mount_program = "/usr/bin/fuse-overlayfs" EOF if [[ -n "$IMAGE_REGISTRY_CREDS" ]]; then - podman login --password "$IMAGE_REGISTRY_CREDS" --username ${IMAGE_REGISTRY_USER:-ANY} $IMAGE_REGISTRY + docker login --password "$IMAGE_REGISTRY_CREDS" --username ${IMAGE_REGISTRY_USER:-ANY} $IMAGE_REGISTRY fi echo "Starting API" @@ -137,6 +137,6 @@ while true; do --discover # Cleanup any build leftovers - podman system prune --all --force + docker system prune --all --force sleep 15 done