mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
docs: add worklow docs
This commit is contained in:
43
project-docs/DOCKER_CHEAT_SHEET.md
Normal file
43
project-docs/DOCKER_CHEAT_SHEET.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Docker cheat sheet
|
||||
|
||||
## List running containers
|
||||
|
||||
```
|
||||
docker ps
|
||||
```
|
||||
|
||||
## List running containers of a `docker-compose.yml`
|
||||
|
||||
In the directory of the `docker-compose.yml`:
|
||||
|
||||
```
|
||||
docker-compose ps
|
||||
```
|
||||
|
||||
## Restart container
|
||||
|
||||
`$CONTAINERID` from `docker ps`.
|
||||
|
||||
```
|
||||
docker restart $CONTAINERID
|
||||
```
|
||||
|
||||
## Run program in container
|
||||
|
||||
`$PROGRAM` can be any program that is installed in the container `bash`, `sh`, `node`, `curl`...
|
||||
|
||||
```
|
||||
docker exec -it $CONTAINERID $PROGRAM
|
||||
```
|
||||
|
||||
## Tidy system
|
||||
|
||||
```
|
||||
docker system prune
|
||||
```
|
||||
|
||||
## Further resources
|
||||
|
||||
* [An Exhaustive Guide to Writing Dockerfiles for Node.js Web Apps](https://blog.hasura.io/an-exhaustive-guide-to-writing-dockerfiles-for-node-js-web-apps-bbee6bd2f3c4)
|
||||
* [Docker and Node.js Best Practices
|
||||
](https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md)
|
||||
Reference in New Issue
Block a user