Docker Commands
02/22/2023
Docker volumes
docker run -it -v src-dir-host:dest-dir-container cs4240-bonus
Clean up after done using containers for local dev.docker rm [container hash or name]
Connecting to a running docker container
docker exec -it [container name] bash
Sample Dockerfile
- Sample Alpine with Bash
FROM alpine:3.14 RUN apk add --no-cache bash RUN mkdir /home/bonus COPY /src/dir/in/host /dest/dir/in/container WORKDIR /dest/dir/in/ur/container