Docker, Interactive Container Session

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

Spin up docker container

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

apk update
apk upgrade
apk add --no-cache bash git openssh

Create/List directory

mkdir data
ls

Clone GIT

git clone https://github.com/charleyza/SQLStatements.git data

Copy to docker volume

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

List installed packages

apk info

Exit interactive session

CTRL D

Leave a Reply