Skip to content

Instantly share code, notes, and snippets.

@kosiara
Created September 22, 2015 15:04
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 kosiara/dd3ccbfadea113d670ce to your computer and use it in GitHub Desktop.
Save kosiara/dd3ccbfadea113d670ce to your computer and use it in GitHub Desktop.
Start Ubuntu docker image with a mounted directory
Prerequisite: Install docker
> docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
#################
# list docker images to see if there is an ubuntu image
> docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest 91e54dfb1179 4 weeks ago 188.4 MB
# run ubuntu image to see if it is working properly
> docker run -t -i ubuntu /bin/bash
# type 'exit' to quit
# run ubuntu image with a mounted path
docker run -t -i -v /home/user/Music/shared_dir:/mnt ubuntu /bin/bash
----------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment