Skip to content

Instantly share code, notes, and snippets.

@vScripter
Last active February 28, 2018 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vScripter/2bbaeac5757dcf6109e115425587ec9a to your computer and use it in GitHub Desktop.
Save vScripter/2bbaeac5757dcf6109e115425587ec9a to your computer and use it in GitHub Desktop.
Docker Commit Test
docker build -t vscripter/alpine-ssh:v1 .
docker push vscripter/alpine-ssh:v1
# ran a few commands and then jumped out and left the container running
docker run -it --name alpine-v2 vscripter/alpine-ssh:v1
# added elinks just to test
docker exec -it alpine-v2 apk add elinks
docker commit alpine-v2 vscripter/alpine-ssh:v2
docker push vscripter/alpine-ssh:v2
# cleaned out images to test a fresh pull
docker rmi vscripter/alpine-ssh:v1
docker rmi vscripter/alpine-ssh:v2
docker pull vscripter/alpine-ssh:v2
# verified that elinks was still there
docker run vscripter/alpine-ssh:v2 apk info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment