-
Notifications
You must be signed in to change notification settings - Fork 13
dockerfile_build_run
M1chaelM edited this page Dec 2, 2020
·
1 revision
To build your image and associate it with an appropriate name, run
docker build --tag <USERNAME>/<IMAGE_REPOSITORY_NAME>:<TAG> .
- E.g.
docker build --tag tylerlum/vorc-competitor-example:v2.2020 .
- The build command above expects to be run from the directory containing the Dockerfile and the scripts you created.
- The
<USERNAME>
must match the username of your DockerHub account. - The
<IMAGE_REPOSITORY_NAME>
is the repository name that the image will be saved to on Dockerhub. - The tag and colon are optional but very helpful for versioning your images.
- Depending on your system and the complexity of the Dockerfile, the build process can take a while to complete.
- Further information about the Docker build command is available in the official Docker Documentation.
- Run
docker run <USERNAME>/<IMAGE_REPOSITORY_NAME>:<TAG>
This will create a container with the image you created in the previous step, and then run/run_my_system.bash
.