Community maintained Docker config for the knot server

skepeo

+16 -5
+16 -5
.tangled/workflows/publish.yml
··· 47 47 48 48 echo "Building image with buildah for TAG: $TAG" 49 49 50 + # Suppress buildah user warnings in CI environment 51 + export BUILDAH_ISOLATION=chroot 52 + export XDG_RUNTIME_DIR=/tmp/buildah-runtime 53 + mkdir -p $XDG_RUNTIME_DIR 54 + 50 55 # Create a new container from alpine 51 56 container=$(buildah from alpine:edge) 52 57 ··· 95 100 96 101 echo "Image built successfully: $DOCKER_USERNAME/$DOCKER_REPO:$TAG" 97 102 98 - - name: "Push Docker image to registry" 103 + - name: "Convert buildah image to Docker format and push" 99 104 command: | 100 105 # Source the environment 101 106 source ~/.bashrc || true ··· 113 118 exit 1 114 119 fi 115 120 121 + # Export buildah image to docker format 122 + buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG docker-archive:image-$TAG.tar 123 + buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:latest docker-archive:image-latest.tar 124 + 125 + # Use skopeo to push to Docker Hub with proper login 126 + echo "Logging in to Docker Hub..." 127 + echo "$DOCKER_PASSWORD" | skopeo login docker.io -u "$DOCKER_USERNAME" --password-stdin 128 + 116 129 echo "Pushing image: $DOCKER_USERNAME/$DOCKER_REPO:$TAG" 117 130 118 131 # Push the tagged image 119 132 skopeo copy \ 120 - --dest-creds="$DOCKER_USERNAME:$DOCKER_PASSWORD" \ 121 - containers-storage:localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG \ 133 + docker-archive:image-$TAG.tar \ 122 134 docker://docker.io/$DOCKER_USERNAME/$DOCKER_REPO:$TAG 123 135 124 136 # Push as latest 125 137 skopeo copy \ 126 - --dest-creds="$DOCKER_USERNAME:$DOCKER_PASSWORD" \ 127 - containers-storage:localhost/$DOCKER_USERNAME/$DOCKER_REPO:latest \ 138 + docker-archive:image-latest.tar \ 128 139 docker://docker.io/$DOCKER_USERNAME/$DOCKER_REPO:latest 129 140 130 141 echo "Successfully pushed both $TAG and latest tags"