Creating Volumes From Dockerfile
Step 1: Create a Dockerfile.
$ vi Dockerfile
Step 2: Write this code in Dockerfile.
FROM ubuntu
VOLUMES ["/my-volume-1"]
Step 3: Create an image from Dockerfile.
$ docker build -t my-image .
Step 4: Now create and run a Container from this image.
...
alamgeerkhan75.hashnode.dev1 min read
AQIB HAFEEZ
I'm Aqib Hafeez, DevOps explorer on a journey to demystify the magic between code and deployment.
Great work