Last active
August 28, 2018 13:07
-
-
Save moronkreacionz/2a298aa0aa90cb7df050c5e4dceba43e to your computer and use it in GitHub Desktop.
Steps to BUILD a Docker Image
This file contains 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
## Build a docker image | |
- Make sure you are in the folder that contains the `Dockerfile` | |
- If your folder is `/my-docker-image-name/`, these 3 files should be in your folder: | |
... | |
/my-docker-image | |
| | |
|---Dockerfile | |
|---Readme.md | |
|---requirements.txt | |
... | |
- Run: `cd /my-docker-image-name` | |
- To build the image, run: `docker build -t <image-name>:<version-number> .` | |
- The above command ensure you have `a dot[.]` at the end of the command included. It means that all the files would be collected and sent to the `docker daemon` context. | |
- Done, the docker image would take time to build, once done, it is ready on your local system. | |
- You can push the Docker image to Docker Hub for public access or reuse as a docker image. | |
Note: Steps on guidance for creating Dockerfile seperately posted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment