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