Last active
February 25, 2021 23:30
-
-
Save kuang-da/5e2dcc06633a201e274dfc8c52810fd4 to your computer and use it in GitHub Desktop.
[Notes about Docker] A notes about Docker's usage #docker #linux
This file contains hidden or 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
#----Introduction--------------- | |
# A notes about Docker's basic usage | |
#------------------------------- | |
# check all current containers | |
docker container ls | |
docker ps | |
# First time to run it in front end | |
docker run -rm -p 8787:8787 -e PASSWORD=chad rocker/rstudio | |
# Then container is able to run in detached mode | |
docker run -d -p 8787:8787 -e USERID=$UID PASSWORD=chad rocker/rstudio | |
# run a R terminal | |
docker run --rm -it --user rstudio rocker/rstudio /usr/bin/R | |
# Change the state of containers | |
docker pause <name> | |
docker stop <container-name> | |
docker rm <container-name> | |
docker rm $(docker ps -a -q) | |
# Remove volumes | |
docker volume ls | |
docker volume prune | |
docker volume rm <name_of_volume> |
This file contains hidden or 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
version: "3.9" | |
services: | |
argos-server: | |
build: . | |
network_mode: host | |
ports: | |
- "3838:3838" | |
environment: | |
- PASSWORD=chad | |
volumes: | |
- .:/home/rstudio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment