Docker, Interactive Container Session

While playing with compose I had the need to manually run an Alpine container:

Spin up docker container

1
docker run -i -v /test-vol --name=voltainer alpine:3.7 /bin/sh

Also see docker-commands -> Interactive processes (like a shell)

Update/Upgrade then install GIT

1
2
3
apk update
apk upgrade
apk add --no-cache bash git openssh

Create/List directory

1
2
mkdir data
ls

Clone GIT

1
git clone https://github.com/carlpaton/SQLStatements.git data

Copy to docker volume

1
cp data/ComposeDemo/*.sql /test-vol

List installed packages

1
apk info

Exit interactive session

1
CTRL D