Running a Docker file stored locally

28,307

The process to run Dockerfile is:

docker build . -t [tag] -f /path/to/Dockerfile

And then:

docker run -d tag
Share:
28,307
jz22
Author by

jz22

Updated on November 14, 2021

Comments

  • jz22
    jz22 over 2 years

    I have a docker file that includes a python script. So far I pushed it to my github and from there to my docker hub. Afterwards I used the command

    docker pull name/repo
    

    I would like to store the docker file I created with a text editor in a folder together with the python scrip and execute it with a command like

    docker run c:/pathtodockerfile
    

    Is that possible?