tangled
alpha
login
or
join now
tangled.org
/
knot-docker
85
fork
atom
Community maintained Docker config for the knot server
85
fork
atom
overview
issues
3
pulls
1
pipelines
Update publish.yml
knotbin.com
6 months ago
6e0e78d7
b03e02c0
0/1
publish.yml
failed
3s
+10
-4
1 changed file
expand all
collapse all
unified
split
.tangled
workflows
publish.yml
+10
-4
.tangled/workflows/publish.yml
···
94
buildah run $container -- sh -c 'echo "#!/bin/sh\ncurl -f http://localhost:5555 || exit 1" > /usr/bin/healthcheck && chmod +x /usr/bin/healthcheck'
95
96
# Commit the container to an image
97
-
buildah commit $container localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG
98
-
buildah tag localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG localhost/$DOCKER_USERNAME/$DOCKER_REPO:latest
99
100
# Clean up
101
buildah rm $container
···
149
EOF
150
cp ~/.config/containers/policy.json /etc/containers/policy.json 2>/dev/null || true
151
0
0
0
152
echo "Exporting buildah images to Docker format..."
153
-
buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG docker-archive:image-$TAG.tar || {
154
echo "Failed to export $TAG image"
155
exit 1
156
}
157
-
buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:latest docker-archive:image-latest.tar || {
0
158
echo "Failed to export latest image"
159
exit 1
160
}
0
0
161
162
echo "Logging in to Docker Hub..."
163
echo "$DOCKER_PASSWORD" | skopeo login docker.io -u "$DOCKER_USERNAME" --password-stdin || {
···
94
buildah run $container -- sh -c 'echo "#!/bin/sh\ncurl -f http://localhost:5555 || exit 1" > /usr/bin/healthcheck && chmod +x /usr/bin/healthcheck'
95
96
# Commit the container to an image
97
+
buildah commit $container $DOCKER_USERNAME/$DOCKER_REPO:$TAG
98
+
buildah tag $DOCKER_USERNAME/$DOCKER_REPO:$TAG $DOCKER_USERNAME/$DOCKER_REPO:latest
99
100
# Clean up
101
buildah rm $container
···
149
EOF
150
cp ~/.config/containers/policy.json /etc/containers/policy.json 2>/dev/null || true
151
152
+
echo "Checking available buildah images..."
153
+
buildah images
154
+
155
echo "Exporting buildah images to Docker format..."
156
+
buildah push $DOCKER_USERNAME/$DOCKER_REPO:$TAG docker-archive:image-$TAG.tar || {
157
echo "Failed to export $TAG image"
158
exit 1
159
}
160
+
161
+
buildah push $DOCKER_USERNAME/$DOCKER_REPO:latest docker-archive:image-latest.tar || {
162
echo "Failed to export latest image"
163
exit 1
164
}
165
+
166
+
echo "Successfully exported both images"
167
168
echo "Logging in to Docker Hub..."
169
echo "$DOCKER_PASSWORD" | skopeo login docker.io -u "$DOCKER_USERNAME" --password-stdin || {