Last active
November 23, 2015 17:20
-
-
Save 0xquad/8aa3812ea7788d2bc687 to your computer and use it in GitHub Desktop.
Script to create a stripped down version of the Docker Debian image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Copyright (c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com> | |
# Released under the MIT LICENSE. | |
# Create a stripped down debian image. | |
docker pull debian | |
cid=$(docker run -dt debian) | |
docker exec $cid rm -fr /usr/share/doc /usr/share/man /usr/share/locale | |
docker stop $cid >/dev/null | |
docker export $cid | docker import -c 'CMD ["/bin/bash"]' - debian-small >/dev/null | |
docker rm $cid >/dev/null | |
docker images | grep debian-small |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment