Build and publish your own Image with Docker and Artifactory
Define the flow
Let's get to work...
1. Create a Dockerfile.
- We will start from a base layer of the latest alpine image.
- Next up is just metadata listing me as the maintainer.
- Next, we are using the CMD instruction to execute a shell command to $ echo hello-world.
2. Build our Docker Image.
3. Publish our build
Now, I'm going to publish our freshly created Image to Artifactory. If you think about it, we are fulfilling Docker's vision. Build, Ship and Run.
We are about to ship our image to our company's central repository so anyone could download and run a container from it.