Search
 
SCRIPT & CODE EXAMPLE
 

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 .)
Comment

docker run dockerfile without building

# I use docker-compose for this convenience since most of the apps I'm building are talking to external services sooner or later, so if I'm going to use it anyway, why not use it from the start. Just have docker-compose.yml as:

version: "3"
services:
  app:
  	pull_policy: "build"
    build: .

# and then just run the app with:

docker-compose up --build app

#It will rebuild the image or reuse the container depending on whether there were changes made to the image definition.
Comment

docker run dockerfile without building

docker run --rm -dit -p 22:22 -p 80:80 -p 443:443 --name vm1 $(docker build -q .)
Comment

PREVIOUS NEXT
Code Example
Shell :: grep process id 
Shell :: Run emulator without Android studio. 
Shell :: isntall jest cli 
Shell :: run cron once a week 
Shell :: git track lfs 
Shell :: linux mint package manager 
Shell :: how to install xeyes on ubuntu 
Shell :: debian give write permission 
Shell :: helm install namespace example 
Shell :: how to kill orphan 
Shell :: how to install modules from requirement.txt 
Shell :: too many authentication failures ec2 
Shell :: g++ use c++20 
Shell :: shell find string in directory 
Shell :: check all the ports in use mac 
Shell :: conda install pydub 
Shell :: install terminus in ubuntu 
Shell :: how to make wsl backup 
Shell :: anaconda install pyinstaller 
Shell :: how to install expo cli on windows 
Shell :: vscode display all extensions 
Shell :: how to turn on scroll lock in ubuntu 
Shell :: how to do change permissions partition in linux 
Shell :: install crossover in linux 
Shell :: remove symfony ubuntu 
Shell :: bash how to trim every nth line 
Shell :: maven test with debug 
Shell :: InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 
Shell :: yarn 2 outdated packages 
Shell :: pm2 adonisjs 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =