Last active
May 15, 2023 10:05
-
-
Save beliaev-maksim/9ffe7356083afa1360f8fdc93f99ebc4 to your computer and use it in GitHub Desktop.
Publish image on ghcr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login using environment variables for GitHub username and API tocken | |
docker login ghcr.io --username $GH_USER --password=$GH_TOKEN | |
# Build image, execute from the directory with `Dockerfile` | |
docker build -t api_demo_server . | |
# tag an image with ghcr tag and version | |
docker tag api_demo_server ghcr.io/beliaev-maksim/api_demo_server:1.0.0 | |
# now push your image to web host | |
docker push ghcr.io/beliaev-maksim/api_demo_server:1.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment