I have following commands, How can I make a docker file from this
docker run -ti -dP --name centos -v /c/Users:/mnt/Users centos:latest /bin/bash
docker start centos
docker attach centos
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
Please help to create a dockerfile from this
2
Answers
Note that you can’t mount volumes when building, you’ll need to copy in files with the
COPY
command (https://docs.docker.com/engine/reference/builder/#copy).