wiki/notebook/assets/challenges.suse-cloud-native-fundamentals-scholarship-program/docker-packaging.sh
Gabriel Arazas b088086b06 Merge evergreen notes into the notebook
Now, it's all under the notebook umbrella. Seems to be appropriate as it
is just my notes after all.

I also updated some notes from there. I didn't keep track of what it is
this time. Something about more learning notes extracted from my
"Learning how to learn" course notes and then some. Lack of time and
hurriness just makes it difficult to track but it should be under
version control already.
2021-07-21 16:28:07 +08:00

20 lines
454 B
Bash

OWNER="foodogsquared"
IMG="go-helloworld"
VERSION="1.0.0"
REMOTE_IMG="${OWNER}/${IMG}:v${VERSION}"
# Build the image with the tag already in place.
podman build --tag "$IMG" .
# Run the packaged app.
podman run -d -p 6111:6111 "$IMG"
# Verify it's running.
podman ps
# Create another image to push it into the Docker registry with the proper naming.
podman tag "$IMG" "$REMOTE_IMG"
# Push the image to the Docker registry.
podman push "$REMOTE_IMG"