---
# System prepended metadata

title: Docker Note

---

# Docker Note

https://github.com/aMikeChen/docker-react

```shell
docker build .
docker build -f Dockerfile.dev .

docker run -it -p 3001:3000 -d --name yeah -v /app/node_modules -v (pwd):/app 6e85610cde20
docker exec -it yeah yarn start
docker start yeah
docker stop yeah
docker kill yeah

# Delete containers
docker system prune
```

## Nginx
https://hub.docker.com/_/nginx

## Docker compose
```yaml
version: '3'
services:
  web:
    stdin_open: true
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - 3000:3000
    volumes:
      - /app/node_modules
      - .:/app
```

## travis
## AWS beanstalk

### Bug
```yaml
EXPOSE 80
COPY --from=0 /app/build /usr/share/nginx/html
```

## 20201005

```shell
mix phx.new docker_phoenix
```

### Dockerignore

```
_build
deps
assets/node_modules
test
```

