Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeff-pedro/learn-docker
Repository used to learn about Docker.
https://github.com/jeff-pedro/learn-docker
docker docker-compose
Last synced: 2 days ago
JSON representation
Repository used to learn about Docker.
- Host: GitHub
- URL: https://github.com/jeff-pedro/learn-docker
- Owner: jeff-pedro
- Created: 2024-03-28T18:01:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-05T16:49:55.000Z (7 months ago)
- Last Synced: 2024-10-12T18:13:54.742Z (about 1 month ago)
- Topics: docker, docker-compose
- Language: JavaScript
- Homepage:
- Size: 1.71 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learning Docker
> Used to explore the Docker world!## Resources
- [Docker official doc]()## Explored
### [Dockerfile]()
1. start app build with Dockerfile
```shell
docker run -dp 3000:3000 \
-w /app -v "$(pwd):/app" \
--network todo-app \
-e MYSQL_HOST=mysql \
-e MYSQL_USER=root \
-e MYSQL_PASSWORD=secret \
-e MYSQL_DB=todos \
node:18-alpine \
sh -c "yarn install && yarn run dev"
```2. start database
```shell
docker run -d \
--network todo-app --network-alias mysql \
-v todo-mysql-data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=todos \
mysql:8.0
```
### [Docker Compose]()**Tests**
- run unit tests
```shell
docker compose run app yarn run test
```- run test during image is built
```shell
docker build -t node-docker-image-test --progress=plain --no-cache --target test .
```
### Docker Swarm
- ...