Skip to content

Instantly share code, notes, and snippets.

@shilpavijay
Last active April 19, 2018 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shilpavijay/ceaab990db4b57da4203ed4394c5c6ee to your computer and use it in GitHub Desktop.
Save shilpavijay/ceaab990db4b57da4203ed4394c5c6ee to your computer and use it in GitHub Desktop.
Docker
Starting nginx
docker run -d -p 80:80 --name webserver nginx
docker images
docker ps -a
remove images:
---------------
docker rmi <>
docker rm
remove container:
------------------
docker container kill <containerID>
Starting a fresh ubuntu session:
docker run -it ubuntu
attaching to existing ubuntu session:
docker ps -a
docker start <containerID>
docker attach <containerID>
docker stop <containerID>
exiting without stopping session:
ctrl+p+q
Run output on local port:
--------------------------
start container with the command:
docker run -p 8080:8080 -it ubuntu
docker attach <containerID>
EX:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f628b726fa7e ubuntu "/bin/bash" 9 seconds ago Up 12 seconds 0.0.0.0:8080->8080/tcp pedantic_banach
Setting up Anaconda:
---------------------
In anaconda installer page, copy link address
apt-get update
apt-get install wget
wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh (for linux, python 3.6)
apt-get install bzip2
sh Anaconda3-5.1.0-Linux-x86_64.sh
source ~/.bashrc
Installing GO on Docker:
--------------------------
wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz
export PATH="/usr/local/go/bin:$PATH" (in bashrc and source it)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment