Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

run image docker ubunt with port

To publish a port for our container, we’ll use the --publish flag (-p for short) on the docker run command. The format of the --publish command is [host_port]:[container_port]. So if we wanted to expose port 8080 inside the container to port 3000 outside the container, we would pass 3000:8080 to the --publish flag.

Start the container and expose port 8080 to port 8080 on the host.

$ docker run --publish 8080:8080 docker-gs-ping

----- see result
$ curl http://localhost:8080/
result: Hello World!
Comment

PREVIOUS NEXT
Code Example
Shell :: ubuntu edit command 
Shell :: install web3modal 
Shell :: crontab test run-parts 
Shell :: kubernetes remove taint 
Shell :: GIT: borrar repositorio local git 
Shell :: docker and kubernetes chear sheet 
Shell :: dpkg --configure -a » pour corriger le problème. 
Shell :: what is /bin/ash 
Shell :: replace delimiter csv for hive table 
Shell :: disable wget messages 
Shell :: ctrl+z equivalent in vim 
Shell :: get folder size in lnux 
Shell :: test(abc,def); = test(test1,test2); 
Shell :: bash inline operator 
Shell :: comment installle des salsh commande 
Shell :: how to create a new branch in git 
Shell :: linux pki wildcard 
Shell :: grep expresion generetor 
Shell :: cdbangular install angular 
Shell :: metasploit rc 
Shell :: powershell script to create github branch 
Shell :: vite 
Shell :: cp terminal progress bar 
Shell :: GitHube commend line 
Shell :: open git bash here not showing 
Shell :: get all files from folders to 1 parent folder 
Shell :: inquiring battery power level linux fedora 
Shell :: docker secrets max lenght 
Shell :: git branch specific files 
Shell :: open video from terminal in ubuntu 18 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =