31 Jul 2016 #Docker
Docker newbie here. I’m using a Mac Book Pro with 128Gb disk. Is there any way to have the docker images be stored in an external hard drive rather than on the mac’s main drive? I don’t have that much free space, and can’t afford to remove any installed software. Ideally I’d like to have Docker fetch the images from an external drive. Automated setup for installing a Docker Lab on your Mac Prerequisites: OSX Yosemite and El Capitan (not tested on the Beta or Developer Previews) Terminal; Internet Access; Changelog: 1.2 Add Python back, updated Docker Toolbox to 1.10.3, added Hashicorp's Otto, added variables for pkg and dmgs. 1.1 Removed Python Installer; 1.0 Initial Build.
A quick guide on how to run containers requiring a GUI with Docker for Mac and XQuartz.
This guide is assuming the following:
- OS X 10.11.5 (El Capitan)
- Docker for Mac 1.12 stable
- XQuartz 2.7.10 beta 2
- Jessie Frazelle’s Firefox Dockerfile
Prerequisites
XQuartz
You’ll need XQuartz, and normally you would probably install it via brew (but not this time):
XQuartz 2.7.9, which is the current one provided by brew, has a bug which will prevent you from following this guide. So, head on over and download XQuartz 2.7.10 beta 2 from here.
Docker Desktop El Capitan
After installing XQuartz, log out and back in to OS X.
Docker for Mac
Download Docker for Mac 1.12 stable from here, install and run.
Go!
Run XQuartz in e.g. bash:
In the XQuartz preferences, go to the “Security” tab and make sure you’ve got “Allow connections from network clients” ticked:
Again, in e.g. bash, run xhost
and allow connections from your local machine:
You can now to run e.g. Jessie Frazelle’s Firefox container:
Docker El Capitan Free
Please enable JavaScript to view the comments powered by Disqus.# Ensure you have brew cask installed http://caskroom.io |
brew install caskroom/cask/brew-cask |
# Install Docker Toolbox (this will install docker machine and virtualbox) |
brew cask install dockertoolbox |
# Create a linux machine for docker container to run on |
docker-machine create --driver virtualbox default |
# Add ENV variables for the machine to your profile (and restart your terminal) |
echo'eval '$(docker-machine env default)''>>~/.bashrc |
# If you didn't restart your terminal, run this now: |
eval'$(docker-machine env default)' |
commented Mar 15, 2016
You'll also probably want docker machine to start each time your machine does. See https://gist.github.com/ericboehs/45e2f2e349249b8253a2. |