Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

docker run dockerfile without building

# If you want to avoid tagging, docker build -q outputs nothing but the final image hash, which you can use as the argument to docker run:

docker run -it $(docker build -q .)

#And add --rm to docker run if you want the container removed automatically when it exits.

docker run --rm -it $(docker build -q .)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #docker #run #dockerfile #building
ADD COMMENT
Topic
Name
4+1 =