Last active
April 19, 2018 04:15
-
-
Save shilpavijay/ceaab990db4b57da4203ed4394c5c6ee to your computer and use it in GitHub Desktop.
Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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