Created
September 7, 2022 08:15
-
-
Save MarshalOfficial/9c2e7897a237bbdb99dd591f3bdd93cc to your computer and use it in GitHub Desktop.
build a custom docker image and push to a custom registry
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
| #ِDockerfile content | |
| FROM ubuntu:latest | |
| RUN apt update -y | |
| RUN apt install -y openjdk-11-jdk | |
| RUN apt install -y dotnet6 | |
| #build then push to any registry | |
| #> docker build -t dotnet6-openjdk11 . | |
| #> docker image tag dotnet6-openjdk11:latest full-path-url-in-your-private-registry/sdk-6.0-openjdk-11:latest | |
| #> docker push full-path-url-in-your-private-registry/sdk-6.0-openjdk-11:latest | |
| #usage in your application dockerfile first line use your custom image: | |
| #> image: full-path-url-in-your-private-registry/sdk-6.0-openjdk-11 | |
| #enjoy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment