docker build -t [name_of_image] .- please replace
name_of_imageto your desired docker image name
docker run -dp 3000:3000 [name_of_image]Other useful flags:
-d: run container in detached mode-p [host_port]:[container_port]: expose container port to host port-i: attach containerSTDIN-t: attach containerSTDOUT--name [name]: name the container--rm: delete the container on shut down
docker run -dp 3000:3000 cl1224/2025cloud- Trigger – A push to
main(or a manualworkflow_dispatch) starts a single workflow run build-imagejob- Checks out the code, sets up QEMU/Buildx, and builds the Docker image locally with the temporary tag
2025cloud:ci - Instead of pushing, it exports the image as a tarball
/tmp/2025cloud.tarand uploads it as the artifact2025cloud-image.
- Checks out the code, sets up QEMU/Buildx, and builds the Docker image locally with the temporary tag
push-imagejob (require success frombuild-image)- Downloads that artifact, docker loads the tarball back into the engine.
- Re-tags the image twice:
USERNAME/2025cloud:latest: latest image will be always from the most recent buildUSERNAME/2025cloud:<commit SHA>: commit-specific image
- Logs in with the Docker Hub secrets and docker push
--all-tagsso both tags land in your registry.
