This commit is contained in:
Misty Stanley-Jones 2016-09-29 12:11:03 -07:00
parent 978130dcf4
commit 3165f14c78
644 changed files with 67506 additions and 82 deletions

1
.gitattributes vendored
View File

@ -1 +0,0 @@
* text=auto

View File

@ -1,51 +0,0 @@
<!--
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to
include the BUG REPORT INFORMATION shown below. If you fail to provide this
information within 7 days, we cannot debug your issue and will close it. We
will, however, reopen it if you later provide the information.
For more information about reporting issues, see
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->
**Output of `docker version`:**
```
(paste your output here)
```
**Output of `docker info`:**
```
(paste your output here)
```
**Additional environment details (AWS, VirtualBox, physical, etc.):**
**Steps to reproduce the issue:**
1.
2.
3.
**Describe the results you received:**
**Describe the results you expected:**
**Additional information you deem important (e.g. issue happens only occasionally):**

View File

@ -1,30 +0,0 @@
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/docker/docker/blob/master/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
For additional information on our contributing process, read our contributing
guide https://docs.docker.com/opensource/code/
If this is a bug fix, make sure your description includes "fixes #xxxx", or
"closes #xxxx"
Please provide the following information:
-->
**- What I did**
**- How I did it**
**- How to verify it**
**- Description for the changelog**
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
**- A picture of a cute animal (not mandatory but encouraged)**

62
.gitignore vendored Normal file
View File

@ -0,0 +1,62 @@
OSS-LICENSES
.DS_Store
shell/shell
shell/shell-history
shell/out.txt
shell/shell-config.json
shell/shell-env.json
shell9pAPI/shell9pAPI
shell9pAPI/sftp/sftp
shell/sftpKeys
shellAgent/shellAgent
shellAgent/hostKey.pem
shell/key.pem
shell/key.pub
agentSDK/node/node_modules/*
!agentSDK/node/node_modules/dockersdk
agentSDK/lib/agentlib.dylib
agentSDK/node/key.pem
agentSDK/node/keyC.pem
agentSDK/node/keyNode.pem
_tests
all-packages.txt
# ignore compiled binaries
v1/agent/agent
v1/agent/com.docker.agent.exe
v1/cmd/proxy/proxy.exe
# ignore generated SSH keys
v1/clitool/key.pem
v1/agent/hostKey.pem
# ignore files generated by cli testing
v1/agent/application_storage
v1/bin
v1/cmd/agent/agent
v1/db/irmin/_build
v1/db/irmin9p/irmin9p
v1/vendor/github.com/mortdeus/go9p/srv/examples/ufs/ufs
# ignore compiled boot2docker, since we will rebuild it
v1/boot2docker/boot2docker-data.img.tar
v1/boot2docker/vmlinuz64
v1/boot2docker/initrd.img
v1/devtool_sdk/libsrpc/libsrpc
v1/devtool_sdk/libsrpc/libsrpc.dylib
v1/devtool_sdk/libsrpc/libsrpc.h
# ignore temporary files from editors
*.swp
*~
*.sdf
*.VC.opendb
_cache
# PLEASE DON'T PUT SUBPROJECT IGNORE PATTERNS HERE.
# PUT THEM IN THE SUBPROJECT'S .gitignore FILE.
# THIS MAKES MAINTENANCE EASIER. THANK YOU.
v1/mac/dependencies
v1/mac/bin/Windows/Dependencies/HyperVInstaller.ps1

1130
CHANGELOG Normal file

File diff suppressed because it is too large Load Diff

21
MAINTAINERS Normal file
View File

@ -0,0 +1,21 @@
Jeffrey Morgan <jmorgan@docker.com>
Sean Li <sean@docker.com>
Michael Chiang <michael.chiang@docker.com>
Adrien Duermael <adrien@docker.com>
Gaetan Devillelle <gaetan@docker.com>
Solomon Hykes <solomon@docker.com>
Dave Scott <dave.scott@docker.com>
Michel Courtine <michel.courtine@docker.com>
Thomas Gazagnaire <thomas.gazagnaire@docker.com>
Emmanuel Briney <emmanuel.briney@docker.com>
Justin Cormack <justin.cormack@docker.com>
David Sheets <david.sheets@docker.com>
Stephen Day <stephen.day@docker.com>
Magnus Skjegstad <magnus.skjegstad@docker.com>
Patrick Chanezon <patrick.chanezon@docker.com>
Thomas Leonard <thomas.leonard@docker.com>
David Gageot <david.gageot@docker.com>
Rolf Neugebauer <rolf.neugebauer@docker.com>
Richard Mortier <richard.mortier@docker.com>
Jean-Laurent de Morlhon <jeanlaurent@docker.com>
Ben Bonnefoy <frenchben@docker.com>

254
Makefile Normal file
View File

@ -0,0 +1,254 @@
MACOSX_DEPLOYMENT_TARGET?=10.10
REPO_ROOT=$(shell git rev-parse --show-toplevel)
OUTPUT?=$(REPO_ROOT)/v1/mac/build/Docker.app
PROJECT_ROOT?=$(GOPATH)/src/github.com/docker/pinata
CACHE_DIR?=$(REPO_ROOT)/_cache
# Getting version from Info.plist file
# NOTE(aduermael): this won't work on Windows
# It will be updated soon to support both platform
# with tags of the form: "win-.*" and "mac-.*"
plistPath=$(PROJECT_ROOT)/v1/mac/src/docker-app/docker/docker/Info.plist
versionFromPlist=$(shell /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$(plistPath)" 2> /dev/null)
PARTS=$(subst -, ,$(versionFromPlist))
VERSION=v$(word 1, $(PARTS))-$(word 2, $(PARTS))
# hockeyapp read-only tokens
HA_MAC_TOKEN=bf3c4239192a4511ab54ff5e963d51b1
HA_WIN_TOKEN=64336e7527dc477da596bedfa2804540
# opam flags
OPAMROOT=$(CACHE_DIR)/opam
OPAMDIR=$(REPO_ROOT)/v1/opam
OPAMFLAGS=MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET) OPAMROOT=$(OPAMROOT) OPAMYES=1 OPAMCOLORS=1 OPAMDIR=$(OPAMDIR) GO15VENDOREXPERIMENT=1
OPAMLIBS=mirage-block-c docker-diagnose osx-daemon osx-hyperkit
OPAMCMDS=osxfs
OPAMSUPPORT=nurse
# TODO: this needs a cleaner solution
BACKENDCMDS=driver.amd64-linux vmnetd osx.hyperkit.linux hyperkit frontend shell #driver.amd64-qemu
LICENSEDIRS=\
$(PROJECT_ROOT)/v1/opam \
$(PROJECT_ROOT)/v1/vendor \
$(PROJECT_ROOT)/v1/uefi \
$(OPAMROOT) \
$(PROJECT_ROOT)/v1/cmd/com.docker.hyperkit \
$(PROJECT_ROOT)/v1/docker_proxy/vendor \
$(PROJECT_ROOT)/v1/mac/src/docker-app/docker/Carthage/Checkouts \
$(PROJECT_ROOT)/v1/mac/dependencies/qemu
.PHONY: all depends opam perf OSS-LICENSES dmg dsym-zip clean cacheclean versions go-fmt go-lint go-vet go-test go-depends
all: opam mac
@
depends: mac-depends qemu-depends opam-depends go-depends moby-depends
@
clean: opam-clean backend-clean moby-clean
$(MAKE) -C $(PROJECT_ROOT)/v1/mac clean
cacheclean:
rm -rf "$(HOME)/.docker-ci-cache/opam"
rm -rf "$(OPAMROOT)"
OSS-LICENSES:
$(OPAMFLAGS) v1/opam/opam-licenses $(OPAMCMDS)
$(MAKE) -C $(PROJECT_ROOT)/v1/cmd/com.docker.hyperkit LICENSE
$(foreach dir, $(LICENSEDIRS), mkdir -p $(dir);)
$(PROJECT_ROOT)/v1/mac/scripts/list-licenses $(LICENSEDIRS) > OSS-LICENSES
# opam applications
UPSTREAM=$(shell ls $(OPAMDIR)/repo/packages/upstream | awk -F. '{ print $$1 }')
DEV=$(shell ls $(OPAMDIR)/repo/packages/dev)
opam-depends:
@brew install opam || true &> /dev/null
@brew install dylibbundler || true &> /dev/null
@$(OPAMFLAGS) $(OPAMDIR)/opam-boot
@$(OPAMFLAGS) opam update -u
@$(OPAMFLAGS) opam install depext
@$(OPAMFLAGS) opam depext $(UPSTREAM) $(DEV) &> /dev/null
@$(OPAMFLAGS) opam install $(UPSTREAM) $(DEV)
opam-lib-clean-%s:
$(OPAMFLAGS) $(MAKE) -C $(PROJECT_ROOT)/v1/$* clean
opam-cmd-clean-%s:
$(OPAMFLAGS) $(MAKE) -C $(PROJECT_ROOT)/v1/cmd/com.docker.$* clean
opam-support-clean-%:
$(OPAMFLAGS) $(MAKE) -C $(PROJECT_ROOT)/support/$* clean
opam-clean: $(OPAMLIBS:%=opam-lib-clean-%s) $(OPAMCMDS:%=opam-cmd-clean-%s) $(OPAMSUPPORT:%=opam-support-clean-%)
@
opam-lib-%:
cd $(PROJECT_ROOT)/v1/$* && $(OPAMFLAGS) ./build.sh
opam-cmd-%:
cd $(PROJECT_ROOT)/v1/cmd/com.docker.$* && $(OPAMFLAGS) ./build.sh
opam-support-%:
cd $(PROJECT_ROOT)/support/$* && $(OPAMFLAGS) ./build.sh
opam: $(OPAMLIBS:%=opam-lib-%) $(OPAMCMDS:%=opam-cmd-%) $(OPAMSUPPORT:%=opam-support-%) OSS-LICENSES
@
# backend
backend-cmd-clean-%:
cd $(PROJECT_ROOT)/v1/cmd/com.docker.$* && $(OPAMFLAGS) $(MAKE) clean
backend-lib-clean-%:
cd $(PROJECT_ROOT)/v1/$* && $(OPAMFLAGS) $(MAKE) clean
backend-clean: $(BACKENDCMDS:%=backend-cmd-clean-%)
@
backend-cmd-%:
cd $(PROJECT_ROOT)/v1/cmd/com.docker.$* && $(OPAMFLAGS) $(MAKE) CACHE_DIR=$(CACHE_DIR)
backend-cmd-vmnetd: opam
backend-cmd-hyperkit: backend-cmd-vmnetd
backend: $(BACKENDCMDS:%=backend-cmd-%)
@
# moby
moby-depends:
go get -u github.com/justincormack/regextract
moby:
cd $(PROJECT_ROOT)/v1/moby && make
moby-clean:
cd $(PROJECT_ROOT)/v1/moby && make clean
# mac app
mac-depends:
cd $(PROJECT_ROOT)/v1/mac/scripts && ./make.bash -dy
mac: opam backend moby docker-release
cd $(PROJECT_ROOT)/v1/mac/scripts && ./make.bash -cby
dmg:
cd $(PROJECT_ROOT)/v1/mac/scripts && ./make-dmg
dsym-zip:
cd $(PROJECT_ROOT)/v1/mac/scripts && ./make-dsym-zip
# run Docker.app
dev: opam mac
rm -rf "$(PROJECT_ROOT)/v1/mac/build"
rm -rf "$(PROJECT_ROOT)/v1/mac/src/docker-app/build"
cd $(PROJECT_ROOT)/v1/mac/src/docker-app && make dev
# open Docker.app .xcodeproj
run:
$(PROJECT_ROOT)/v1/mac/build/Docker.app/Contents/MacOS/Docker
backend-run:
@$(PROJECT_ROOT)/v1/cmd/com.docker.shell/com.docker.shell -debug -bundle $(PROJECT_ROOT)/v1/mac/build/Docker.app
# tests
lint: go-fmt go-lint go-vet
# lint test scripts
brew install shellcheck
find tests/cases -type f | xargs -L1 file -I | grep 'text/x-shellscript' | cut -f1 -d":" | xargs -L1 shellcheck -e SC2129,SC1090,SC2039
GOPACKAGES = $(eval GOPACKAGES := $(shell cd $(PROJECT_ROOT)/v1 && go list -e ./... | grep -v vendor | grep -v moby))$(GOPACKAGES)
go-depends:
go get -u github.com/golang/lint/golint
go-fmt:
@for pkg in $(GOPACKAGES) ; do \
echo "gofmt $${pkg##*pinata/} ..." ;\
cd $(PROJECT_ROOT)/$${pkg##*pinata/} ;\
test -z "$$(gofmt -s -l . 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" || exit 1 ;\
done
go-lint:
@for pkg in $(GOPACKAGES) ; do \
echo "golint $${pkg##*pinata/} ..." ;\
cd $(PROJECT_ROOT)/$${pkg##*pinata/} ;\
test -z "$$(golint . 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" || exit 1 ;\
done
go-vet:
@cd $(PROJECT_ROOT) && go vet $(GOPACKAGES)
go-test:
@cd $(PROJECT_ROOT) && for pkg in $(GOPACKAGES) ; do \
echo "testing $$pkg ..." ;\
go test -race -v $$pkg ;\
done
test-depends: opam
cd $(PROJECT_ROOT)/v1/tests && $(OPAMFLAGS) ./build.sh
test: lint test-depends go-test
(cd $(PROJECT_ROOT)/tests && ./rt-local -l nostart,checkout -v -x run)
# test-dmg also tests the dmg - it's assumed that `make dmg` was performed first first
test-dmg: lint test-depends go-test
(cd $(PROJECT_ROOT)/tests && ./rt-local -l installer,checkout -v -x run)
fulltest:
(cd $(PROJECT_ROOT)/tests && ./rt-local -l nostart,release,checkout -v -x run)
PINATA_APP_PATH=$(OUTPUT) $(PROJECT_ROOT)/v1/tests/pinata-rt test -e
perf:
make -C $(PROJECT_ROOT)/v1/perf
# qemu
QEMUV = 2.4.1
export QEMUV
qemu-depends:
@mkdir -p $(CACHE_DIR)
@cd $(PROJECT_ROOT)/v1/cmd/com.docker.driver.amd64-qemu && make depends CACHE_DIR=$(CACHE_DIR)
# upload to HockeyApp
upload:
@cd $(PROJECT_ROOT)/v1/mac/scripts && ./make.bash -uy
release:
rm -rf "$(PROJECT_ROOT)/v1/mac/build"
rm -rf "$(HOME)/.docker-ci-cache"
rm -rf "$(CACHE_DIR)"
make depends
make
make test
git tag $(VERSION) -a -m "Release $(VERSION)"
git push upstream $(VERSION)
versions:
@echo git tag name: $(VERSION)
@echo Xcode project version \(Info.plist\): $(versionFromPlist)
@echo Changelog: $(shell head -n 1 CHANGELOG | cut -f 3 -d" ")
@echo docker-diagnose: $(shell cat v1/docker-diagnose/src/dockerCli.ml | grep check_version)
release-to-rc:
@echo "Releasing latest builds to RC (the newest unreleased build will also be downloaded)"
docker-release --channel rc --arch mac --build latest publish
docker-release --channel rc --arch win --build latest publish
# docker-release build
docker-release:
cd $(PROJECT_ROOT)/v1/docker-release && make
# helpful targets for development
logwatch:
syslog -w -F '$$Time $$Host $$(Sender)[$$(Facility)][$$(PID)]\n<$$((Level)(str))>: $$Message' \
-k Sender Seq Docker -o \
-k Sender Seq docker -o \
-k Message Seq Docker -o \
-k Message Seq docker

163
README.md Normal file
View File

@ -0,0 +1,163 @@
# Pinata: an experimental standalone Docker client
| | pr | master | rc | beta | stable |
|---|---|---|---|---|---|
| macOS | [latest](https://download-stage.docker.com/mac/pr/Docker.dmg) | [latest](https://download-stage.docker.com/mac/master/Docker.dmg) | [latest](https://download-stage.docker.com/mac/rc/Docker.dmg) | [latest](https://download.docker.com/mac/beta/Docker.dmg) | [latest](https://download.docker.com/mac/stable/Docker.dmg) |
| Windows | [latest](https://download-stage.docker.com/win/pr/InstallDocker.msi) | [latest](https://download-stage.docker.com/win/master/InstallDocker.msi) | [latest](https://download-stage.docker.com/win/test/InstallDocker.msi) | [latest](https://download.docker.com/win/beta/InstallDocker.msi) | [latest](https://download.docker.com/win/stable/InstallDocker.msi) |
*( if you get Access Denied errors, it means nothing has been published to this channel yet )*
To list all the versions: http://omakase.omakase.e57b9b5b.svc.dockerapp.io/
This is an experimental project to develop a new client for Docker,
separately from the daemon or any other backend component.
By maintaining a standalone client, the goal is to:
1. Allow for more rapid iteration on client functionality.
2. Improve compatibility between different versions of the client and daemon.
3. Add more features to the client without bloating the daemon-side components.
4. Pave the way to simplifying the daemon code base, improving its
quality and making its maintenance easier.
## Versioning
The release cycle respects the following convention: `X-Y[-Z]` where:
- `X` is the version of the docker engine used as a base for the build. The build can be modified during the build process to fit better into the use-case of `Docker.app` (ie. it won't usually be a drop-in replacement, but we will try to upstream our patches as quickly as possible).
- `Y` is an arbitrary string that we can use to define a version of `Docker.app`, independently of the release cycle of docker engine.
- `Z` indicates the build channel (dev, test, master, release). `Z` is empty for releases.
For instance the first beta release of pinata has the version: `1.9.1-beta1`. While on master channel (one build for each PR merged), it has the version: `1.9.1-beta1-master`.
On OS X, the version is defined in XCode project's Info.plist file (key: `CFBundleShortVersionString`). There's also a build number, associated with `CFBundleVersion` key (set by CI).
In Xcode project, the version should use a suffix like `-dev` (`1.9.1-beta1-dev`). That suffix will be replaced/removed by CI.
## INSTALL
### Through HockeyApp
For Docker for Mac see the [Docker.app installation guide](https://github.com/docker/pinata/blob/master/v1/docs/content/mackit/getting-started.md) and for Docker for Windows see the [Docker installation guide](https://github.com/docker/pinata/blob/master/v1/docs/content/winkit/getting-started.md)
### OSX Build
Check that your `GOPATH` is correctly set-up and clone this repository in
`$GOPATH/src/github.com/docker/pinata`.
#### Dependencies
As prerequisites, you need to have `Xcode`, `homebrew` and `go` installed.
To minimize build times, the dependencies are cached with this command
You only need to run it once or when an external dependency was updated
At the root of this repository, type:
```
make depends
```
When you add a new go dependency, add it in the `GO_DEPS` variable of the toplevel
`Makefile`.
#### Build
After a successful `make depends`, type:
```
make
```
If you are asked for the password to the `dockerbuilder` keychain, it is
`docker4all`.
#### Run
After a successful `make depends` and `make`, type:
```
make run
```
You will see the logs on stdout
#### Install
First, make sure you have uninstalled any previous installation of
pinata with:
```
v1/mac/uninstall
```
Then, install with:
```
v1/mac/build/Docker.app/Contents/MacOS/docker-installer
```
#### Tests
You can run the tests by running:
```
make test
```
This is currently Mac only.
### Windows Build
[![Build status](https://ci.appveyor.com/api/projects/status/fpa7neeotor31bdh/branch/master?svg=true)](https://ci.appveyor.com/project/Pinata/pinata/branch/master)
Latest msi builds :
* On [Master](https://download-stage.docker.com/win/master/InstallDocker.msi) channel.
* On [Test](https://download-stage.docker.com/win/test/InstallDocker.msi) channel.
Check that your `GOPATH` is correctly set-up and clone this repository in
`$GOPATH/src/github.com/docker/pinata`.
#### Dependencies
Install:
- Go 1.6
- [Visual Studio 2015](https://www.visualstudio.com/en-us/products/vs-2015-product-editions.aspx). The app builds with the free Community edition but the licensing for that edition doesn't allow its use for commercial, closed source work.
Once you installed the above, open a powershell.
#### Build
The main build is driven by the `please.ps1` powershell script in the `win`
sub-directory.
```
cd <pinata_dir>/win
./please.ps1 package
```
will clean the build directory and build a new package (installer) in
the `build` sub-directory.
```
cd <pinata_dir>/win
./please.ps1 build
```
will build a new `Docker.exe` file but not the installer.
### Troubleshooting
If you have an issue, please report it to the
[bugtracker](https://github.com/docker/pinata/issues) with the output
of:
```
pinata diagnose
```
This is currently Mac only.

54
appveyor.yml Normal file
View File

@ -0,0 +1,54 @@
environment:
GOPATH: c:\gopath
SIGNTOOLPATH: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin
clone_folder: c:\gopath\src\github.com\docker\pinata
before_build:
- cd win/
build_script:
- ps: ./please.ps1 AppVeyor
after_build:
- cd ..
- ps: >
copy .\win\build\InstallDocker.msi InstallDocker.msi
artifacts:
- path: win/build/InstallDocker.msi
- path: win/TestResults/*.xml
- path: InstallDocker.msi
test: off
configuration: Release
before_deploy:
- ps: >
if ($env:appveyor_pull_request_number -gt 0) {
git fetch -q origin +refs/pull/$env:appveyor_pull_request_number/head
$env:commit=(git rev-parse FETCH_HEAD)
} else {
$env:commit=$env:appveyor_repo_commit
}
true;
deploy:
- provider: S3
bucket: pinata-ci
access_key_id: $(pinata_aws_key)
secret_access_key: $(pinata_aws_secret)
folder: $(commit)
artifact: InstallDocker.msi
on:
appveyor_repo_tag: false
- provider: S3
bucket: pinata-ci
access_key_id: $(pinata_aws_key)
secret_access_key: $(pinata_aws_secret)
folder: $(appveyor_repo_tag_name)
artifact: InstallDocker.msi
on:
appveyor_repo_tag: true

27
circle-linux.yml Normal file
View File

@ -0,0 +1,27 @@
# Linux specific circleci.yml
# This build process only build the docs.
# A process mirrors this repo in another repo for every commit, and cp circle-linux.yml to circle.yml.
# This ensures that a Linux build happens in circleci for every commit.
general:
build_dir: v1
artifacts:
- "docs/public"
- "mac/build"
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
- make -C docs DOCS_EXPORT=public docs-deploy
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- mac/make -cblvy
- mkdir -p ~/docker; mkdir -p ~/pinata/v1/mac/build
- docker save pinata/docker-builder > ~/docker/image.tar
deployment:
master:
branch: master
commands:
- make -C docs DOCS_EXPORT=public docs-deploy

105
circle.yml Normal file
View File

@ -0,0 +1,105 @@
# Mac specific circleci.yml
# This build process will download and bundle the build artifacts from the linux ci.
# Checkout the same file on the linux branch to edit the linux version of the circleci configuration
general:
artifacts:
- v1/mac/build/Docker.dmg
- tests/_results
- ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log
- ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring
machine:
xcode:
version: "8.0"
environment:
GOVERSION: 1.7.1
GOPATH: "$HOME/go"
GOROOT: "${HOME}/.gimme/versions/go${GOVERSION}.darwin.amd64"
PATH: "${GOROOT}/bin:${GOPATH}/bin:${PATH}"
PROJECT_ROOT: "$GOPATH/src/github.com/docker/pinata"
CI: "1"
post:
- brew unpin go
- brew update
- brew -v install git-lfs
# something forces /usr/loca/bin to the front of the path.
# we'll remove the existing go to be sure
- rm /usr/local/bin/go
- brew -v install gimme
- gimme $GOVERSION
# display homebrew config
- brew config
checkout:
post:
- brew unpin go
- git lfs install --local
- git lfs pull
# Check disk space
- df -h
# check consistency of v1/opam/repo
- v1/opam/repo/check.sh
# v1/cmd/com.docker.hyperkit/hyperkit/ is a git subtree merge from
# http://github.com/docker/hyperkit and no code should be
# committed directly to it. To do this we need to unshallow and to
# have the hyperkit history available.
#
# Mistakes were made prior to
# 5e58d3e47a592e9235c4d03a099bc52ccd7a47ae which were repaired in
# that commit. Start checking from then onwards.
- if [ -s .git/shallow ] ; then git fetch --unshallow git@github.com:docker/pinata master ; fi
- git fetch https://github.com/docker/hyperkit +master:hyperkit/master
- >
if ! git log --no-merges --stat 5e58d3e47a592e9235c4d03a099bc52ccd7a47ae..HEAD --not hyperkit/master -- v1/cmd/com.docker.hyperkit/hyperkit/ |
awk 'BEGIN { rc=0 }; // { rc=1; print }; END { exit $rc }' ; then
echo "";
echo "Direct commit to hyperkit vendored code detected. Please see:";
echo "https://github.com/docker/pinata/blob/master/v1/cmd/com.docker.hyperkit/README.md";
exit 1
fi
dependencies:
override:
- which go
- go version
- rm -rf "$PROJECT_ROOT"
- mkdir -p $(dirname "$PROJECT_ROOT")
- ln -s $(pwd) "$PROJECT_ROOT"
- make cacheclean
- make mac-depends
- make opam-depends
- make moby-depends
- make go-depends
cache_directories:
- ~/.docker-ci-cache
test:
override:
- make clean
- make opam
- make mac
- make dmg
- make dsym-zip
- make test-dmg
- >
syslog -F "\$Time \$Host \$(Sender)[\$(Facility)][\$(PID)]<\$((Level)(str))>: \$Message" \
-k Sender Seq Docker -o \
-k Sender Seq docker -o \
-k Message Seq Docker -o \
-k Message Seq docker
deployment:
release:
branch: master
owner: docker
commands:
- aws s3 cp v1/mac/build/Docker.dmg s3://pinata-ci/$CIRCLE_SHA1/Docker.dmg
- make upload
tags:
tag: /.*/
owner: docker
commands:
- aws s3 cp v1/mac/build/Docker.dmg s3://pinata-ci/$CIRCLE_TAG/Docker.dmg
- make upload
pr:
branch: /.*/
owner: docker
commands:
- aws s3 cp v1/mac/build/Docker.dmg s3://pinata-ci/$CIRCLE_SHA1/Docker.dmg
- make upload

10
docs/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM docs/base:oss
MAINTAINER Docker Docs <docs@docker.com>
# because both the 2 dir's are going into the root
env PROJECT=
# To get the git info for this repo
COPY . /src
#RUN rm -rf /docs/content/$PROJECT/
COPY . /docs/content/$PROJECT/

39
docs/Makefile Normal file
View File

@ -0,0 +1,39 @@
.PHONY: all default docs docs-build docs-shell shell test
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
# to allow `make DOCSPORT=9000 docs`
DOCSPORT := 8000
# Get the IP ADDRESS
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
HUGO_BIND_IP=0.0.0.0
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
# for some docs workarounds (see below in "docs-build" target)
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
default: docs
docs: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
docs-draft: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
docs-shell: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
test: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)"
docs-build:
docker build -t "$(DOCKER_DOCS_IMAGE)" .

View File

@ -0,0 +1,145 @@
<!--[metadata]>
+++
aliases = [
"/mackit/docker-toolbox/"
]
title = "Docker for Mac vs. Docker Toolbox"
description = "Docker for Mac and Docker Toolbox"
keywords = ["mac, windows, alpha, beta, toolbox, docker-machine, tutorial"]
[menu.main]
identifier="kit-toolbox"
parent="pinata_mac_menu"
weight = 2
+++
<![end-metadata]-->
# Docker for Mac vs. Docker Toolbox
If you already have an installation of Docker Toolbox, please read these topics first to learn how Docker for Mac and Docker Toolbox differ, and how they can coexist.
<a name="toolbox-env"></a>
## The Docker Toolbox environment
Docker Toolbox installs `docker`, `docker-compose` and `docker-machine` in `/usr/local/bin` on your Mac. It also installs VirtualBox. At installation time, Toolbox uses `docker-machine` to provision a VirtualBox VM called `default`, running the `boot2docker` Linux distribution, with [Docker Engine](https://docs.docker.com/engine/) with certificates located on your Mac at `$HOME/.docker/machine/machines/default`.
Before you use `docker` or `docker-compose` on your Mac, you typically use the command `eval $(docker-machine env default)` to set environment variables so that `docker` or `docker-compose` know how to talk to Docker Engine running on VirtualBox.
This setup is shown in the following diagram.
![Docker Toolbox Install](images/toolbox-install.png)
<a name="docker-mac-env"></a>
## The Docker for Mac environment
Docker for Mac is a Mac native application, that you install in `/Applications`. At installation time, it creates symlinks in `/usr/local/bin` for `docker` and `docker-compose`, to the version of the commands inside the Mac application bundle, in `/Applications/Docker.app/Contents/Resources/bin`.
Here are some key points to know about Docker for Mac before you get started:
* Docker for Mac does not use VirtualBox, but rather <a href="https://github.com/docker/HyperKit/" target="_blank">HyperKit</a>, a lightweight OS X virtualization solution built on top of Hypervisor.framework in OS X 10.10 Yosemite and higher.
* Installing Docker for Mac does not affect machines you created with Docker Machine. The install offers to copy containers and images from your local `default` machine (if one exists) to the new Docker for Mac HyperKit VM. If chosen, content from `default` is copied to the new Docker for Mac HyperKit VM, and your original `default` machine is kept as is.
* The Docker for Mac application does not use `docker-machine` to provision that VM; but rather creates and manages it directly.
* At installation time, Docker for Mac provisions an HyperKit VM based on Alpine Linux, running Docker Engine. It exposes the docker API on a socket in `/var/tmp/docker.sock`. Since this is the default location where `docker` will look if no environment variables are set, you can start using `docker` and `docker-compose` without setting any environment variables.
This setup is shown in the following diagram.
![Docker for Mac Install](images/docker-for-mac-install.png)
With Docker for Mac, you get only one VM, and you don't manage it. It is managed by the Docker for Mac application, which includes autoupdate to update the client and server versions of Docker.
If you need several VMs and want to manage the version of the Docker client or server you are using, you can continue to use `docker-machine`, on the same machine, as described in [Docker Toolbox and Docker for Mac coexistence](#docker-toolbox-and-docker-for-mac-coexistence).
<a name="docker-mac-setup"></a>
## Setting up to run Docker for Mac
1. Check whether Toolbox DOCKER environment variables are set:
$ env | grep DOCKER
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_MACHINE_NAME=default
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=/Users/victoriabialas/.docker/machine/machines/default
If this command returns no output, you are ready to use Docker for Mac.
If it returns output (as shown in the example), you need to unset the `DOCKER` environment variables to make the client talk to the Docker for Mac Engine (next step).
2. Run the `unset` command on the following `DOCKER` environment variables to unset them in the current shell.
unset DOCKER_TLS_VERIFY
unset DOCKER_CERT_PATH
unset DOCKER_MACHINE_NAME
unset DOCKER_HOST
Now, this command should return no output.
$ env | grep DOCKER
If you are using a Bash shell, you can use `unset ${!DOCKER_*}` to unset all DOCKER environment variables at once. (This will not work in other shells such as `.zsh`; you will need to unset each variable individually.)
>**Note**: If you have a shell script as part of your profile that sets these `DOCKER` environment variables automatically each time you open a command window, then you will need to unset these each time you want to use Docker for Mac.
> **Warning**: If you install Docker for Mac on a machine where Docker Toolbox is installed, it will replace the `docker` and `docker-compose` command lines in `/usr/local/bin` with symlinks to its own versions.
<a name="coexist"></a>
## Docker Toolbox and Docker for Mac coexistence
You can use Docker for Mac and Docker Toolbox together on the same machine. When you want to use Docker for Mac, make sure all DOCKER environment variables are unset. You can do this in bash with `unset ${!DOCKER_*}`. When you want to use one of the VirtualBox VMs you have set with `docker-machine`, just run a `eval $(docker-machine env default)` (or the name of the machine you want to target). This will switch the current command shell to talk to the specified Toolbox machine.
This setup is represented in the following diagram.
![Docker Toolbox and Docker for Mac coexistence](images/docker-for-mac-and-toolbox.png)
<a name="dvm"></a>
## Using different versions of Docker tools
The coexistence setup works as is as long as your VirtualBox VMs provisioned with `docker-machine` run the same version of Docker Engine as Docker for Mac. If you need to use VMs running older versions of Docker Engine, you can use a tool like <a href="https://github.com/getcarina/dvm" target="_blank">Docker Version Manager</a> to manage several versions of docker client.
<a name="check-versions"></a>
### Checking component versions
Ideally, the Docker CLI client and Docker Engine should be the same version. Mismatches between client and server, and among host machines you might have created with Docker Machine can cause problems (client can't talk to the server or host machines).
If you already have <a href="https://docs.docker.com/toolbox/overview/" target="_blank">Docker Toolbox</a> installed, and then install Docker for Mac, you might get a newer version of the Docker client. Run `docker version` in a command shell to see client and server versions. In this example, the client installed with Docker for Mac is `Version: 1.11.1` and the server (which was installed earlier with Toolbox) is Version: 1.11.0.
$ docker version
Client:
Version: 1.11.1
...
Server:
Version: 1.11.0
...
Also, if you created machines with Docker Machine (installed with Toolbox) then upgraded or installed Docker for Mac, you might have machines running different versions of Engine. Run `docker-machine ls` to view version information for the machines you created. In this example, the DOCKER column shows that each machine is running a different version of server.
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
aws-sandbox - amazonec2 Running tcp://52.90.113.128:2376 v1.10.0
default * virtualbox Running tcp://192.168.99.100:2376 v1.10.1
docker-sandbox - digitalocean Running tcp://104.131.43.236:2376 v1.10.0
You might also run into a similar situation with Docker Universal Control Plan (UCP).
There are a few ways to address this problem and keep using your older machines. One solution is to use a version manager like <a href="https://github.com/getcarina/dvm" target="_blank">DVM</a>.
## How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker for Mac,
and want to uninstall it. For details on how to perform a clean uninstall of
Toolbox on the Mac, see [How to uninstall
Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the
Toolbox Mac topics.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,38 @@
<!--[metadata]>
+++
title = " Example Applications"
description = "Docker for Mac and Docker for Windows Tutorials"
keywords = ["mac, windows, examples, Compose"]
[menu.main]
identifier="docker-mac-examples"
parent="pinata_mac_menu"
weight="8"
+++
<![end-metadata]-->
# Example Applications
Upcoming releases will include example applications especially tailored for Docker for Mac and Docker for Windows.
Examples will highlight develop, build, and run workfows in several languages, including Node.js, Python, Ruby, and Java.
For now, if you want get started experimenting with the Beta apps and Docker Compose (which is installed automatically with Docker Desktop Editions), have a look at these example applications in the Compose documentation. You should be able to run these with Docker for Mac and Docker for Windows.
<a href=https://docs.docker.com/compose/django/ target="_blank">Quickstart: Compose and Django</a>
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
<a href=https://docs.docker.com/compose/wordpress/ target="_blank">Quickstart: Compose and WordPress</a>
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, runnning containers, networking, managing data, and storing images on Docker Hub.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

156
docs/docker-for-mac/faqs.md Normal file
View File

@ -0,0 +1,156 @@
<!--[metadata]>
+++
aliases = [
"/mackit/faqs/"
]
title = "FAQs"
description = "Frequently asked questions"
keywords = ["mac faqs"]
[menu.main]
identifier="docker-mac-faqs"
parent="pinata_mac_menu"
weight = 7
+++
<![end-metadata]-->
# Frequently Asked Questions (FAQs)
**Looking for popular FAQs on Docker for Mac?** Check out the [Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs, technical support for various subscription levels, and more.
### Stable and beta channels
**Q: How do I get the stable or beta version of Docker for Mac?**
A: Use the download links for the channels given in the topic [Download Docker for Mac](index.md#download-docker-for-mac).
This topic also has more information about the two channels.
**Q: What is the difference between the stable and beta versions of Docker for Mac?**
A: Two different download channels are available for Docker for Mac:
* The stable channel provides a general availability release-ready installer for a fully baked and tested, more reliable app. The stable version of Docker for Mac comes with the latest released version of Docker Engine. The release schedule is synched with Docker Engine releases and hotfixes.
* The beta channel provides an installer with new features we are working on, but is not necessarily fully tested. It comes with the experimental version of Docker Engine. Bugs, crashes and issues are more likely to occur with the beta app, but you get a chance to preview new functionality, experiment, and provide feedback as the apps evolve. Releases are typically more frequent than for stable, often one or more per month.
**Q: Can I switch back and forth between stable and beta versions of Docker for Mac?**
A: Yes, you can switch between versions to try out the betas to see what's new, then go back to stable for other work. However, **you can have only one app installed at a time**. Switching back and forth between stable and beta apps can de-stabilize your development environment, particularly in cases where you switch from a newer (beta) channel to older (stable).
For example, containers created with a newer beta version of Docker for Mac may not work after you switch back to stable because they may have been created leveraging beta features that aren't in stable yet. Just keep this in mind as you create and work with beta containers, perhaps in the spirit of a playground space where you are prepared to troubleshoot or start over.
<font color="#CC3366">To safely switch between beta and stable versions be sure to save images and export the containers you need, then uninstall the current version before installing another. The workflow is described in more detail below.</font><br>
Do the following each time:
1. Use `docker save` to save any images you want to keep. (See [save](/engine/reference/commandline/save.md) in the Docker Engine command line reference.)
2. Use `docker export` to export containers you want to keep. (See [export](/engine/reference/commandline/export.md) in the Docker Engine command line reference.)
3. Uninstall the current app (whether stable or beta).
4. Install a different version of the app (stable or beta).
### What is Docker.app?
`Docker.app` is Docker for Mac, a bundle of Docker client, and Docker
Engine. `Docker.app` uses the OS X
Hypervisor.framework (part of MacOS X 10.10 Yosemite and higher)
to run containers, meaning that _**no separate VirtualBox is required**_.
### What kind of feedback are we looking for?
Everything is fair game. We'd like your impressions on the download-install process, startup, functionality available, the GUI, usefulness of the app,
command line integration, and so on. Tell us about problems, what you like, or functionality you'd like to see added.
We are especially interested in getting feedback on the new swarm mode described in [Docker Swarm](/engine/swarm/index.md). A good place to start is the [tutorial](/engine/swarm/swarm-tutorial/index.md).
### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on [Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues) or create a new one. You can also create new issues based on diagnostics. To learn more, see [Diagnose problems, send feedback, and create GitHub issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues).
[Docker for Mac forum](https://forums.docker.com/c/docker-for-mac) provides discussion threads as well, and you can create discussion topics there, but we recommend using the GitHub issues over the forums for better tracking and response.
### Can I use Docker for Mac with new swarm mode?
Yes, you can use Docker for Mac to test single-node features of [swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
initializing a swarm with a single node, creating services, and scaling
services. Docker “Moby” on Hyperkit will serve as the single swarm node. You can
also use Docker Machine, which comes with Docker for Mac, to create and
experiment a multi-node swarm. Check out the tutorial at [Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
### How do I connect to the remote Docker Engine API?
You might need to provide the location of the remote API for Docker clients and development tools.
On Docker for Mac, clients can connect to the Docker Engine through a Unix socket: `unix:///var/run/docker.sock`.
See also [Docker Remote API](/engine/reference/api/docker_remote_api.md) and Docker for Mac forums topic [Using pycharm Docker plugin..](https://forums.docker.com/t/using-pycharm-docker-plugin-with-docker-beta/8617).
If you are working with applications like [Apache Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables, specify these to connect to Docker instances through Unix sockets. For example:
export DOCKER_HOST=unix:///var/run/docker.sock
### How do I connect from a container to a service on the host?
The Mac has a changing IP address (or none if you have no network access). Our current recommendation is to attach an unused IP to the `lo0` interface on the Mac so that containers can connect to this address.
For a full explanation and examples, see [I want to connect from a container to a service on the host](networking.md#i-want-to-connect-from-a-container-to-a-service-on-the-host) under [Known Limitations, Use Cases, and Workarounds](networking.md#known-limitations-use-cases-and-workarounds) in the Networking topic.
### How do I to connect to a container from the Mac?
Our current recommendation is to publish a port, or to connect from another container. Note that this is what you have to do even on Linux if the container is on an overlay network, not a bridge network, as these are not routed.
For a full explanation and examples, see [I want to connect to a container from the Mac](networking.md#i-want-to-connect-to-a-container-from-the-mac) under [Known Limitations, Use Cases, and Workarounds](networking.md#known-limitations-use-cases-and-workarounds) in the Networking topic.
### What are system requirements for Docker for Mac?
Note that you need a Mac that supports hardware virtualization, which is most non ancient ones; i.e., use OS X `10.10.3+` or `10.11` (OS X Yosemite or OS X El Capitan). See also "What to know before you install" in [Getting Started](index.md).
<a name="faq-toolbox"></a>
### Do I need to uninstall Docker Toolbox to use Docker for Mac?
No, you can use these side by side. Docker Toolbox leverages a Docker daemon installed using `docker-machine` in a machine called `default`. Running `eval $(docker-machine env default)` in a shell sets DOCKER environment variables locally to connect to the default machine using Engine from Toolbox. To check whether Toolbox DOCKER environment variables are set, run `env | grep DOCKER`.
To make the client talk to the Docker for Mac Engine, run the command `unset ${!DOCKER_*}` to unset all DOCKER environment variables in the current shell. (Now, `env | grep DOCKER` should return no output.) You can have multiple command line shells open, some set to talk to Engine from Toolbox and others set to talk to Docker for Mac. The same applies to `docker-compose`.
### How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker for Mac,
and want to uninstall it. For details on how to perform a clean uninstall of
Toolbox on the Mac, see [How to uninstall
Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the
Toolbox Mac topics.
### What is HyperKit?
HyperKit is a hypervisor built on top of the Hypervisor.framework in OS X 10.10 Yosemite and higher. It runs entirely in userspace and has no other dependencies.
We use HyperKit to eliminate the need for other VM products, such as Oracle Virtualbox or VMWare Fusion.
### What is the benefit of HyperKit?
It is thinner than VirtualBox and VMWare fusion, and the version we include is tailor made for Docker workloads on the Mac.
### Why is com.docker.vmnetd running after I quit the app?
The privileged helper process `com.docker.vmnetd` is started by `launchd` and runs in the background. The process will not
consume any resources unless Docker.app connects to it, so it's safe to ignore.
### Can I pass through a USB device to a container?
Unfortunately it is not possible to pass through a USB device (or a serial port) to a container. For use cases requiring this, we recommend the use of [Docker Toolbox](/toolbox/overview.md).
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,293 @@
<!--[metadata]>
+++
aliases = [
"/mackit/",
"/mackit/getting-started/",
"/mac/",
"/mac/started/",
"/docker-for-mac/started/"
]
title = "Getting Started"
description = "Getting Started"
keywords = ["mac, beta, alpha, tutorial"]
[menu.main]
identifier="docker-mac-getstart"
parent="pinata_mac_menu"
weight = 1
+++
<![end-metadata]-->
# Getting Started with Docker for Mac
Welcome to Docker for Mac!
Please read through these topics on how to get started. To **give us feedback** on your experience with the app and report bugs or problems, log in to our [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac).
>**Already have Docker for Mac?** If you already have Docker for Mac installed, and are ready to get started, skip over to the [Getting Started with Docker](/engine/getstarted/index.md) tutorial.
<a name="download"></a>
## Download Docker for Mac
If you have not already done so, please install Docker for Mac. You can download installers from the stable or beta channel.
For more about stable and beta channels, see the [FAQs](faqs.md#stable-and-beta-channels).
<table style="width:100%">
<tr>
<th style="font-size: x-large; font-family: arial">Stable channel</th>
<th style="font-size: x-large; font-family: arial">Beta channel</th>
</tr>
<tr valign="top">
<td width="50%">This installer is fully baked and tested, and comes with the latest GA version of Docker Engine. <br><br>This is the best channel to use if you want a reliable platform to work with. <br><br>These releases follow a version schedule with a longer lead time than the betas, synched with Docker Engine releases and hotfixes.
</td>
<td width="50%">This installer offers cutting edge features and comes with the experimental version of Docker Engine, which is described in the <a href="https://github.com/docker/docker/tree/master/experimental" target="_blank">Docker Experimental Features README</a> on GitHub.<br><br>This is the best channel to use if you want to experiment with features we are working on as they become available, and can weather some instability and bugs. This channel is a continuation of the beta program, where you can provide feedback as the apps evolve. Releases are typically more frequent than for stable, often one or more per month.</td>
</tr>
<tr valign="top">
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac (stable)</a><br><br>
<a href="https://download.docker.com/mac/stable/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: <font color="#BDBDBD">Docker.dmg SHA256</font></a></font>
</td>
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/beta/Docker.dmg">Get Docker for Mac (beta)</a><br><br>
<a href="https://download.docker.com/mac/beta/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: <font color="#BDBDBD">Docker.dmg SHA256</font></a></font>
</td>
</tr>
</table>
>**Important Notes**:
>
>* Docker for Mac requires OS X 10.10.3 Yosemite or newer running on a 2010 or newer Mac, with Intel's hardware support for MMU virtualization. Please see [What to know before you install](#what-to-know-before-you-install) for a full list of prerequisites.
>
>* <font color="#CC3366">You can switch between beta and stable versions, but _you must have only one app installed at a time_.</font> Also, you will need to save images and export containers you want to keep before uninstalling the current version before installing another. For more about this, see the [FAQs about beta and stable channels](faqs.md#stable-and-beta-channels).
<a name="preqs"></a>
## What to know before you install
* **README FIRST for Docker Toolbox and Docker Machine users**: If you are already running Docker on your machine, first read [Docker for Mac vs. Docker Toolbox](docker-toolbox.md) to understand the impact of this installation on your existing setup, how to set your environment for Docker for Mac, and how the two products can coexist.
* **Relationship to Docker Machine**: Installing Docker for Mac does not affect machines you created with Docker Machine. You'll get the option to copy containers and images from your local `default` machine (if one exists) to the new Docker for Mac <a href="https://github.com/docker/HyperKit/" target="_blank">HyperKit</a> VM.
* **System Requirements**: Docker for Mac will launch only if all these requirements are met.
- Mac must be a 2010 or newer model, with Intel's hardware support for memory management unit (MMU) virtualization; i.e., Extended Page Tables (EPT)
- OS X 10.10.3 Yosemite or newer
- At least 4GB of RAM
- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac)
> **Note**: If your system does not satisfy these requirements, you can install [Docker Toolbox](/toolbox/overview.md), which uses Oracle Virtual Box instead of HyperKit.
* **What the install includes**: The installation provides [Docker Engine](https://docs.docker.com/engine/userguide/intro/), Docker CLI client, [Docker Compose](https://docs.docker.com/compose/overview/), and [Docker Machine](https://docs.docker.com/machine/overview/).
<a name="run"></a>
## Step 1. Install and Run Docker for Mac
1. Double-click `Docker.dmg` to open the installer, then drag Moby the whale to the Applications folder.
![Install Docker app](images/docker-app-drag.png)
You will be asked to authorize `Docker.app` with your system password during the install process. Privileged access is needed to install networking components and links to the Docker apps.
2. Double-click `Docker.app` to start Docker.
![Docker app in Hockeyapp](images/docker-app-in-apps.png)
The whale in the top status bar indicates that Docker is running, and accessible from a terminal.
![Whale in menu bar](images/whale-in-menu-bar.png)
If you just installed the app, you also get a success message with suggested next steps and a link to this documentation. Click the whale (<img src="images/whale-x.png">) in the status bar to dismiss this popup.
![Docker success](images/mac-install-success-docker-ps.png)
3. Click the whale (<img src="images/whale-x.png">) to get Preferences, and other options.
![Docker context menu](images/menu.png)
4. Select **About Docker** to verify that you have the latest version.
Congratulations! You are up and running with Docker for Mac.
<a name="check-versions"></a>
## Step 2. Check versions of Docker Engine, Compose, and Machine
Run these commands to test if your versions of `docker`, `docker-compose`, and `docker-machine` are up-to-date and compatible with `Docker.app`.
```shell
$ docker --version
Docker version 1.12.0, build 8eab29e
$ docker-compose --version
docker-compose version 1.8.0, build f3628c7
$ docker-machine --version
docker-machine version 0.8.0, build b85aac1
```
>**Note**: The above is an example. Your output will differ if you are running different (e.g., newer) versions.
<a name="explore"></a>
## Step 3. Explore the application and run examples
1. Open a command-line terminal, and run some Docker commands to verify that Docker is working as expected.
Some good commands to try are `docker version` to check that you have the latest release installed, and `docker ps` and `docker run hello-world` to verify that Docker is running.
2. For something more adventurous, start a Dockerized web server.
```shell
docker run -d -p 80:80 --name webserver nginx
```
If the image is not found locally, Docker will pull it from Docker Hub.
In a web browser, go to `http://localhost/` to bring up the home page. (Since you specified the default HTTP port, it isn't necessary to append `:80` at the end of the URL.)
![nginx home page](images/hello-world-nginx.png)
>**Note:** Early beta releases used `docker` as the hostname to build the URL. Now, ports are exposed on the private IP addresses of the VM and forwarded to `localhost` with no other host name set. See also, [Release Notes](release-notes.md) for Beta 9.
>
3. Run `docker ps` while your web server is running to see details on the webserver container.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp webserver
4. Stop or remove containers and images.
The `nginx` webserver will continue to run in the container on that port until you stop and/or remove the container. If you want to stop the webserver, type: `docker stop webserver` and start it again with `docker start webserver`.
To stop and remove the running container with a single command, type: `docker rm -f webserver`. This will remove the container, but not the `nginx` image. You can list local images with `docker images`. You might want to keep some images around so that you don't have to pull them again from Docker Hub. To remove an image you no longer need, use `docker rmi <imageID>|<imageName>`. For example, `docker rmi nginx`.
**Want more example applictions?** - For more example walkthroughs that include setting up services and databases in Docker Compose, see [Example Applications](examples.md).
## Preferences
Choose <img src="images/whale-x.png"> --> **Preferences** from the menu bar. You can set the following runtime options.
#### General
![Preferences](images/settings.png)
* Docker for Mac is set to **automatically start** when you log in. Uncheck the login autostart option if you don't want Docker to start when you open your session.
* Docker for Mac is set to **check for updates** automatically and notify you when an update is available. If an update is found, click **OK** to accept and install it (or cancel to keep the current version). If you disable the check for updates, you can still find out about updates manually by choosing <img src="images/whale-x.png"> -> **Check for Updates**
* Check **Exclude VM from Time Machine backups** to prevent Time Machine from backing up the Docker for Mac virtual machine.
* **CPUs** - By default, Docker for Mac is set to use 2 processors. You can increase processing power for the app by setting this to a higher number, or lower it to have Docker for Mac use fewer computing resources.
* **Memory** - By default, Docker for Mac is set to use `2` GB runtime memory, allocated from the total available memory on your Mac. You can increase the RAM on the app to get faster performance by setting this number higher (for example to `3`) or lower (to `1`) if you want Docker for Mac to use less memory.
#### Advanced
![Advanced Preference settings-advanced](images/settings-advanced.png)
* **Adding registries** - As an alternative to using [Docker Hub](https://hub.docker.com/) to store your public or private images or [Docker Trusted Registry](https://docs.docker.com/docker-trusted-registry/overview/), you can use Docker to set up your own insecure [registry](https://docs.docker.com/registry/introduction/). Add URLs for insecure registries and registry mirrors on which to host your images.
* **HTTP proxy settings** - Docker for Mac will detect HTTP/HTTPS Proxy Settings and automatically propagate these to Docker and to your containers.
For example, if you set your proxy settings to `http://proxy.example.com`, Docker will use this proxy when pulling containers.
#### File sharing
You can decide which directories on your Mac to share with containers.
* **Add a Directory** - Click `+` and navigate to the directory you want to add.
![File Sharing](images/settings-file-share.png)
* Click **Apply & Restart** to make the directory available to
containers using Docker's bind mount (`-v`) feature.
There are some limitations on the directories that can be shared:
* They cannot be a subdirectory of an already shared directory.
* They cannot already exist inside of Docker.
See [Namespaces](osxfs.md#namespaces) in the topic on [osxfs file system sharing](osxfs.md) for more information.
#### Privacy
You can set Docker for Mac to auto-send diagnostics, crash reports, and usage data. This information can help Docker improve the application and get more context for troubleshooting problems.
Uncheck any of the options to opt out and prevent auto-send of data. Docker may prompt for more information in some cases, even with auto-send enabled.
![Privacy](images/privacy.png)
Also, you can enable or disable these auto-reporting settings with one click on the information popup when you first start Docker.
![Startup information](images/mac-install-success-docker-wait.png)
## Uninstall or reset
Choose <img src="images/whale-x.png"> --> **Preferences** from the menu bar, then click **Uninstall / Reset** on the Preferences dialog.
![Uninstall or reset Docker](images/settings-uninstall.png)
* **Uninstall** - Choose this option to remove Docker for Mac from your system.
* **Reset to factory defaults** - Choose this option to reset all options on Docker for Mac to its initial state, the same as when it was first installed.
You can uninstall Docker for Mac from the command line with this command: `<DockerforMacPath> --uninstall`. If Docker is installed in the default location, the following command will provide a clean uninstall.
```shell
$ /Applications/Docker.app/Contents/MacOS/Docker --uninstall
Docker is running, exiting...
Docker uninstalled successfully. You can move the Docker application to the trash.
```
You might want to use the command-line uninstall if, for example, you find that the app is non-functional, and you cannot uninstall it from the menu.
<a name="bash-completion"></a>
## Installing bash completion
If you are using [bash completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1), such as [homebrew bash-completion on Mac](http://davidalger.com/development/bash-completion-on-os-x-with-brew/), bash completion scripts for
- docker
- docker-machine
- docker-compose
may be found inside Docker.app, in the Contents/Resources/etc folder.
To activate bash completion, these files need to be copied or symlinked to
your bash_completion.d directory. For example, if you use <a href="http://brew.sh/" target="_blank">Homebrew</a>:
```
cd /usr/local/etc/bash_completion.d
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion
```
## Where to go next
* Try out the [Getting Started with Docker](/engine/getstarted/index.md) tutorial.
* Dig in deeper with [learn by example](/engine/tutorials/index.md) tutorials on on building images, runnning containers, networking, managing data, and storing images on Docker Hub.
* See [Example Applications](examples.md) for example applications that include setting up services and databases in Docker Compose.
* Interested in trying out the new [swarm mode](/engine/swarm/index.md) on Docker Engine v1.12?
See [Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md), a tutorial which includes specifics on how to leverage your Docker for Mac installation to run single and multi-node swarms.
Also, try out the Swarm examples in [docker labs](https://github.com/docker/labs/tree/master/swarm-mode/beginner-tutorial). Run the `bash script` and follow the accompanying [Docker Swarm Tutorial](https://github.com/docker/labs/blob/master/swarm-mode/beginner-tutorial/README.md). The script uses Docker Machine to create a multi-node swarm, then walks you through various Swarm tasks and commands.
* For a summary of Docker command line interface (CLI) commands, see [Docker CLI Reference Guide](/engine/reference/index.md).
* Check out the <a href="https://blog.docker.com/2016/06/docker-mac-windows-public-beta/">blog posts</a> on Docker for Mac and Docker for Windows public betas, and <a href="https://blog.docker.com/2016/03/docker-for-mac-windows-beta/">earlier posts</a> on the intial private beta.
* Please give feedback on your experience with the app and report bugs and problems by logging into our [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac).
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,14 @@
<!--[metadata]>
+++
aliases = [
]
title = "Docker for Mac"
description = "Docker Mac"
keywords = ["docker, mac, desktop, editions"]
[menu.main]
identifier="pinata_mac_menu"
weight = -80
+++
<![end-metadata]-->
# Docker for Mac

View File

@ -0,0 +1,48 @@
<!--[metadata]>
+++
aliases = [
"/mackit/multi-arch/"
]
title = "Leveraging Multi-CPU Architecture Support "
description = "Multi-CPU Architecture Support"
keywords = ["mac, Multi-CPU architecture support"]
[menu.main]
identifier='mac-multiarch'
parent="pinata_mac_menu"
weight = 3
+++
<![end-metadata]-->
# Leveraging Multi-CPU Architecture Support
Docker for Mac provides `binfmt_misc` multi architecture support, so you can run containers for different Linux architectures, such as `arm`, `mips`, `ppc64le` and even `s390x`.
This should just work without any configuration, but the containers you run need to have the appropriate `qemu` binary inside the container before you can do this. (See <a href=http://wiki.qemu.org/ target="_blank">QEMU</a> for more information.)
So, you can run a container that already has this set up, like the <a href="https://resin.io/how-it-works/" target="_blank">resin</a> arm builds:
```
$ docker run resin/armv7hf-debian uname -a
Linux 7ed2fca7a3f0 4.1.12 #1 SMP Tue Jan 12 10:51:00 UTC 2016 armv7l GNU/Linux
$ docker run justincormack/ppc64le-debian uname -a
Linux edd13885f316 4.1.12 #1 SMP Tue Jan 12 10:51:00 UTC 2016 ppc64le GNU/Linux
```
Running containers pre-configured with `qemu` has the advantage that you can use these to do builds `FROM`, so you can build new Multi-CPU architecture packages.
Alternatively, you can bind mount in the `qemu` static binaries to any cross-architecture package, such as the semi-official ones using a script like this one https://github.com/justincormack/cross-docker. (See the README at the given link for details on how to use the script.)
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,121 @@
<!--[metadata]>
+++
aliases = [
"/mackit/networking/"
]
title = "Networking "
description = "Networking"
keywords = ["mac, networking"]
[menu.main]
identifier='mac-networking'
parent="pinata_mac_menu"
weight = 4
+++
<![end-metadata]-->
# Networking
Docker for Mac provides several networking features to make it easier to use.
## Features
### VPN Passthrough
Docker for Mac's networking can work when attached to a VPN.
To do this, Docker for Mac intercepts traffic from the `HyperKit` and injects it into OSX as if it originated from the Docker application.
### Port Mapping
When you run a container with the `-p` argument, for example:
```
$ docker run -p 80:80 -d nginx
```
Docker for Mac will make the container port available at `localhost`.
### HTTP/HTTPS Proxy Support
Docker for Mac will detect HTTP/HTTPS Proxy Settings from OSX and automatically propagate these to Docker and to your containers.
For example, if you set your proxy settings to `http://proxy.example.com` in OSX, Docker will use this proxy when pulling containers.
![OSX Proxy Settings](images/proxy-settings.png)
When you start a container, you will see that your proxy settings propagate into the containers. For example:
```
$ docker run -it alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=b7edf988b2b5
TERM=xterm
HOME=/root
HTTP_PROXY=http://proxy.example.com:3128
http_proxy=http://proxy.example.com:3128
no_proxy=*.local, 169.254/16
```
You can see from the above output that the `HTTP_PROXY`, `http_proxy` and `no_proxy` environment variables are set.
When your proxy configuration changes, Docker restarts automatically to pick up the new settings.
If you have containers that you wish to keep running across restarts, you should consider using [restart policies](https://docs.docker.com/engine/reference/run/#restart-policies-restart)
## Known Limitations, Use Cases, and Workarounds
Following is a summary of current limitations on the Docker for Mac networking stack, along with some ideas for workarounds.
### There is no docker0 bridge on OSX
Because of the way networking is implemented in Docker for Mac, you cannot see a `docker0` interface in OSX.
This interface is actually within `HyperKit`.
### I cannot ping my containers
Unfortunately, due to limtations in OSX, we're unable to route traffic to containers, and from containers back to the host.
### Per-container IP addressing is not possible
The docker (Linux) bridge network is not reachable from the OSX host.
### Use cases and workarounds
There are two scenarios that the above limitations will affect:
#### I want to connect from a container to a service on the host
The Mac has a changing IP address (or none if you have no network access). Our current recommendation is to attach an unused IP to the `lo0` interface on the Mac; for example: `sudo ifconfig lo0 alias 10.200.10.1/24`, and make sure that your service is listening on this address or `0.0.0.0` (ie not `127.0.0.1`). Then containers can connect to this address.
#### I want to connect to a container from the Mac
Port forwarding works for `localhost`; `--publish`, `-p`, or `-P` all work. Ports exposed from Linux are forwarded to the Mac.
Our current recommendation is to publish a port, or to connect from another container. Note that this is what you have to do even on Linux if the container is on an overlay network, not a bridge network, as these are not routed.
The command to run the `nginx` webserver shown in [Getting Started](index.md#explore) is an example of this.
```shell
docker run -d -p 80:80 --name webserver nginx
```
To clarify the syntax, the following two commands both expose port `80` on the container to port `8000` on the host:
docker run --publish 8000:80 --name webserver nginx
docker run --p 8000:80 --name webserver nginx
To expose all ports, use the `-P` flag. For example, the following command starts a container (in detached mode) and the `-P` exposes all ports on the container to random ports on the host.
docker run -d -P --name webserver nginx
See the [run commmand](/engine/reference/commandline/run.md) for more details on publish options used with `docker run`.
#### A view into implementation
We understand that these workarounds are not ideal, but there are several problems. In particular, there is a bug in OSX that is only fixed in 10.12 and is not being backported as far as we can tell, which means that we could not support this in all supported OSX versions. In addition, this network setup would require root access which we are trying to avoid entirely in Docker for Mac (we currently have a very small root helper that we are trying to remove).
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,34 @@
<!--[metadata]>
+++
title = "Open Source Licensing"
description = "Docker's use of Open Source"
keywords = ["docker, opensource"]
[menu.main]
parent="pinata_mac_menu"
identifier='opensource-mac'
weight="9"
+++
<![end-metadata]-->
# Open Source Components and Licensing
Docker Desktop Editions are built using open source software. For
details on the licensing, choose <img src="../images/whale-x.png"> -->
**About Docker** from within the application, then click
**Acknowledgements**.
Docker Desktop Editions distribute some components that are licensed under the GNU General Public License. You can download the source for these components [here](https://download.docker.com/opensource/License.tar.gz).
The sources for `qemu-img` can be obtained [here](http://wiki.qemu-project.org/download/qemu-2.4.1.tar.bz2).
The sources for the `gettext` and `glib` libraries that `qemu-img` requires were obtained from [Homebrew](https://brew.sh) and may be retrieved using `brew install --build-from-source gettext glib`.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,166 @@
<!--[metadata]>
+++
aliases = [
"/mackit/osxfs/"
]
title = "File system sharing "
description = "OSXFS"
keywords = ["mac, osxfs"]
[menu.main]
identifier='mac-osxfs'
parent="pinata_mac_menu"
weight = 5
+++
<![end-metadata]-->
# File system sharing (osxfs)
`osxfs` is a new shared file system solution, exclusive to Docker for
Mac. `osxfs` provides a close-to-native
user experience for bind mounting OS X file system trees into Docker
containers. To this end, `osxfs` features a number of unique
capabilities as well as differences from a classical Linux file system.
- [Case sensitivity](#case-sensitivity)
- [Access control](#access-control)
- [Namespaces](#namespaces)
- [Ownership](#ownership)
- [File system events](#file-system-events)
- [Mounts](#mounts)
- [Symlinks](#symlinks)
- [File types](#file-types)
- [Extended attributes](#extended-attributes)
- [Technology](#technology)
### Case sensitivity
With Docker for Mac, file systems are shared from OS X into containers
in the same way as they operate in OS X. As a result, if a file system
on OS X is case-insensitive that behavior is shared by any bind mount
from OS X into a container. The default OS X file system is HFS+ and,
during installation, it is installed as case-insensitive by default. To
get case-sensitive behavior from your bind mounts, you must either
create and format a ramdisk or external volume as HFS+ with
case-sensitivity or reformat your OS root partition with HFS+ with
case-sensitivity. We do not recommend reformatting your root partition
as some Mac software dubiously relies on case-insensitivity to function.
<a name="osxfs-access"></a>
### Access control
`osxfs`, and therefore Docker, can access only those file system
resources that the Docker for Mac user has access to. `osxfs` does
not run as `root`. If the OS X user is an administrator, `osxfs` inherits
those administrator privileges. We are still evaluating which privileges
to drop in the file system process to balance security and
ease-of-use. `osxfs` performs no additional permissions checks and
enforces no extra access control on accesses made through it. All
processes in containers can access the same objects in the same way as
the Docker user who started the containers.
### Namespaces
Much of the OS X file system that is accessible to the user is also
available to containers using the `-v` bind mount syntax. By default,
you can share files in `/Users`, `/Volumes`, `/private`, and `/tmp`
directly. To add or remove directory trees that are exported to Docker,
use the **File sharing** tab in Docker preferences <img
src="../images/whale-x.png"> -> **Preferences** -> **File
sharing**. (See [Preferences](index.md#preferences).) All other paths
used in `-v` bind mounts are sourced from the Moby Linux VM running the
Docker containers, so arguments such as `-v
/var/run/docker.sock:/var/run/docker.sock` should work as expected. If
an OS X path is not shared and does not exist in th VM, an attempt to
bind mount it will fail rather than create it in the VM. Paths that
already exist in the VM and contain files are reserved by Docker and
cannot be exported from OS X.
### Ownership
Initially, any containerized process that requests ownership metadata of
an object is told that its `uid` and `gid` own the object. When any
containerized process changes the ownership of a shared file system
object, e.g. with `chown`, the new ownership information is persisted in
the `com.docker.owner` extended attribute of the object. Subsequent
requests for ownership metadata will return the previously set
values. Ownership-based permissions are only enforced at the OS X file
system level with all accessing processes behaving as the user running
Docker. If the user does not have permission to read extended attributes
on an object, e.g. when that object's permissions are `0000`, ownership
will be reported as the accessing process until the extended attribute
is again readable.
### File system events
Most `inotify` events are supported in bind mounts, and likely `dnotify`
and `fanotify` (though they have not been tested) are also supported.
This means that file system events from OS X are sent into containers
and trigger any listening processes there.
The following are **supported file system events**:
* Creation
* Modification
* Attribute changes
* Deletion
* Directory changes
The following are **partially supported file system events**:
* Move events trigger `IN_DELETE` on the source of the rename and
`IN_MODIFY` on the destination of the rename
The following are **unsupported file system events**:
* Open
* Access
* Close events
* Unmount events (see <a href="#osxfs-mounts">Mounts</a>)
Some events may be delivered multiple times. Events are not delivered for bind mounts from symlinks (notably `/tmp` will not deliver inotify events but
`/private/tmp` will). These limitations do not apply to events between
containers, only to those events originating in OS X.
<a name="osxfs-mounts"></a>
### Mounts
The OS X mount structure is not visible in the shared volume, but volume
contents are visible. Volume contents appear in the same file system as the
rest of the shared file system. Mounting/unmounting OS X volumes that
are also bind mounted into containers may result in unexpected behavior
in those containers. Unmount events are not supported. Mount export
support is planned but is still under development.
### Symlinks
Symlinks are shared unmodified. This may cause issues when symlinks
contain paths that rely on the default case-insensitivity of the
default OS X file system, HFS+.
### File types
Symlinks, hardlinks, socket files, named pipes, regular files, and
directories are supported. Socket files and named pipes only transmit
between containers and between OS X processes -- no transmission across
the hypervisor is supported, yet. Character and block device files are
not supported.
### Extended attributes
Extended attributes are not yet supported.
### Technology
`osxfs` does not use OSXFUSE. `osxfs` does not run under, inside, or
between OS X userspace processes and the OS X kernel.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,332 @@
<!--[metadata]>
+++
aliases = [
"/mackit/troubleshoot/"
]
title = "Logs and Troubleshooting"
description = "Troubleshooting, logs, and known issues"
keywords = ["mac, troubleshooting, logs, issues"]
[menu.main]
identifier="docker-mac-troubleshoot"
parent="pinata_mac_menu"
weight = 6
+++
<![end-metadata]-->
# Logs and Troubleshooting
Here is information about how to diagnose and troubleshoot problems, send logs and communicate with the Docker for Mac team, use our forums and Knowledge Hub, browse and log issues on GitHub, and find workarounds for known problems.
## Docker Knowledge Hub
**Looking for help with Docker for Mac?** Check out the [Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs, and technical support for various subscription levels.
## Diagnose problems, send feedback, and create GitHub issues
If you encounter problems for which you do not find solutions in this documentation, [Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues) already filed by other users, or on the [Docker for Mac forum](https://forums.docker.com/c/docker-for-mac), we can help you troubleshoot the log data.
Choose <img src="../images/whale-x.png"> --> **Diagnose & Feedback** from the menu bar.
![Diagnose problems](images/settings-diagnose.png)
You can choose to run diagnostics only, or diagnose and send the results to the Docker Team:
* **Diagnose Only** - Runs diagnostics, and shows results locally. (Results are not sent to Docker, and no ID is generated.)
![Diagnostic results only](images/settings-diagnostic-results-only.png)
* **Diagnose & Upload** - Runs diagnostics, shows results, and auto-uploads the diagnostic results to Docker. A diagnostic ID is auto-generated. You can refer to this ID when communicating with the Docker Team. Optionally, you can open an issue on GitHub using the uploaded results and ID as a basis.
![Diagnostics & Feedback](images/settings-diagnose-id.png)
If you click **Open Issues**, this opens [Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues/) in your web browser in a “create new issue” template prepopulated with the following:
* ID and summary of the diagnostic you just ran
* System and version details
* Sections where you can fill in a description of expected and actual behavior, and steps to reproduce the issue
![Create issue on GitHub](images/diagnose-issue.png)
You can also create a new issue directly on GitHub at https://github.com/docker/for-mac/issues. (The README for the repository is [here](https://github.com/docker/for-mac).)
Click [New Issue](https://github.com/docker/for-mac/issues/new) on that page (or right here &#9786;) to get a "create new issue" template prepopulated with sections for the ID and summary of your diagnostics, system and version details, description of expected and actual behavior, and steps to reproduce the issue.
![issue template](images/diagnose-d4mac-issues-template.png)
<a name="logs"></a>
## Checking the logs
In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself.
#### Use the command line to view logs
To view Docker for Mac logs at the command line, type this command in a terminal window or your favorite shell.
$ syslog -k Sender Docker
Alternatively, you can send the output of this command to a file. The following command redirects the log output to a file called `my_docker_logs.txt`.
$ syslog -k Sender Docker > ~/Desktop/my_docker_logs.txt
#### Use the Mac Console for log queries
Macs provide a built-in log viewer. You can use the Mac Console System Log Query to check Docker app logs.
The Console lives on your Mac hard drive in `Applications` > `Utilities`. You can bring it up quickly by just searching for it with Spotlight Search.
To find all Docker app log messages, do the following.
1. From the Console menu, choose **File** > **New System Log Query...**
![Mac Console search for Docker app](images/console_logs_search.png)
* Name your search (for example `Docker`)
* Set the **Sender** to **Docker**
2. Click **OK** to run the log query.
![Mac Console display of Docker app search results](images/console_logs.png)
You can use the Console Log Query to search logs, filter the results in various ways, and create reports.
For example, you could construct a search for log messages sent by Docker that contain the word `hypervisor` then filter the results by time (earlier, later, now).
The diagnostics and usage information to the left of the results provide auto-generated reports on packages.
<a name="troubleshoot"></a>
## Troubleshooting
#### Recreate or update your containers after Beta 18 upgrade
Docker 1.12.0 RC3 release introduces a backward incompatible change from RC2 to RC3. (For more information, see https://github.com/docker/docker/issues/24343#issuecomment-230623542.)
You may get the following error when you try to start a container created with pre-Beta 18 Docker for Mac applications.
Error response from daemon: Unknown runtime specified default
You can fix this by either [recreating](#recreate-your-containers) or [updating](#update-your-containers) your containers.
If you get the error message shown above, we recommend recreating them.
##### Recreate your containers
To recreate your containers, use Docker Compose.
docker-compose down && docker-compose up
##### Update your containers
To fix existing containers, follow these steps.
1. Run this command.
$ docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
91e7f9981d55: Pull complete
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
2. Quit Docker.
3. Start Docker.
> **Note:** Be sure to quit and then restart Docker for Mac before attempting to start containers.
4. Try to start the container again:
$ docker start old-container
old-container
#### Incompatible CPU detected
Docker for Mac requires a processor (CPU) that supports virtualization and, more specifically, the [Apple Hypervisor framework](https://developer.apple.com/library/mac/documentation/DriversKernelHardware/Reference/Hypervisor/). Docker for Mac is only compatible with Macs that have a CPU that supports the Hypervisor framework. Most Macs built in 2010 and later support it, as described in the Apple Hypervisor Framework documentation about supported hardware:
*Generally, machines with an Intel VT-x feature set that includes Extended Page Tables (EPT) and Unrestricted Mode are supported.*
To check if your Mac supports the Hypervisor framework, run this command in a terminal window.
```
sysctl kern.hv_support
```
If your Mac supports the Hypervisor Framework, the command will print `kern.hv_support: 1`.
If not, the command will print `kern.hv_support: 0`.
See also, [Hypervisor Framework Reference](https://developer.apple.com/library/mac/documentation/DriversKernelHardware/Reference/Hypervisor/) in the Apple documentation, and Docker for Mac system requirements in [What to know before you install](index.md#what-to-know-before-you-install).
#### Workarounds for common problems
* IPv6 workaround to auto-filter DNS addresses - IPv6 is not yet supported on Docker for Mac, which typically manifests as a network timeout when running `docker` commands that need access to external network servers (e.g., `docker pull busybox`).
```
$ docker pull busybox
Using default tag: latest
Pulling repository docker.io/library/busybox
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/busybox/images. You may want to check your internet connection or if you are behind a proxy.
```
Starting with v1.12.1, 2016-09016 on the stable channel, and Beta 24 on the beta channel, a workaround is provided that auto-filters out the IPv6 addresses in DNS server lists and enables successful network accesss. For example, `2001:4860:4860::8888` would become `8.8.8.8`. So, the only workaround action needed for users is to [upgrade to Docker for Mac stable v1.12.1 or newer, or Beta 24 or newer](index.md#download-docker-for-mac).
On releases with the workaround included to filter out / truncate IPv6 addresses from the DNS list, the above command should run properly:
```
$ docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
Digest: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
Status: Image is up to date for busy box:latest
```
To learn more, see these issues on GitHub and Docker for Mac forums:
* [Network timeout when top two DNS servers in /etc/resolv.conf are IPv6 addresses](https://github.com/docker/for-mac/issues/9)
* [ERROR: Network timed out while trying to connect to index.docker.io](https://forums.docker.com/t/error-network-timed-out-while-trying-to-connect-to-index-docker-io/17206)
* If Docker for Mac fails to install or start properly:
* Make sure you quit Docker for Mac before installing a new version of the application ( <img src="../images/whale-x.png"> --> **Quit Docker**). Otherwise, you will get an "application in use" error when you try to copy the new app from the `.dmg` to `/Applications`.
* Restart your Mac to stop / discard any vestige of the daemon running from the previously installed version.
* Run the the uninstall commands from the menu.
<p></p>
* If `docker` commands aren't working properly or as expected:
Make sure you are not using the legacy Docker Machine environment in your shell
or command window. You do not need `DOCKER_HOST` set, so unset it as it may be
pointing at another Docker (e.g. VirtualBox). If you use bash, `unset
${!DOCKER_*}` will unset existing `DOCKER` environment variables you have set.
For other shells, unset each environment variable individually as described in
[Setting up to run Docker for
Mac](docker-toolbox.md#setting-up-to-run-docker-for-mac) in [Docker for Mac vs.
Docker Toolbox](docker-toolbox.md).
<p></p>
* Note that network connections will fail if the OS X Firewall is set to
"Block all incoming connections". You can enable the firewall, but `bootpd` must be allowed incoming connections so that the VM can get an IP address.
<p></p>
* For the `hello-world-nginx` example, Docker for Mac must be running in order to get to the webserver on `http://localhost/`. Make sure that the Docker whale
is showing in the menu bar, and that you run the Docker commands in a shell that
is connected to the Docker for Mac Engine (not Engine from Toolbox). Otherwise,
you might start the webserver container but get a "web page not available" error
when you go to `localhost`. For more on distinguishing between the two
environments, see [Docker for Mac vs. Docker Toolbox](docker-toolbox.md).
<p></p>
* If you see errors like `Bind for 0.0.0.0:8080 failed: port is already allocated` or
`listen tcp:0.0.0.0:8080: bind: address is already in use`:
These errors are often caused by some other software on the Mac using those ports.
Run `lsof -i tcp:8080` to discover the name and pid of the other process and
decide whether to shut the other process down, or to use a different port in
your docker app.
See also [Known Issues](#known-issues) on this page, and the [FAQs](faqs.md) topic.
<a name="issues"></a>
## Known issues
* IPv6 is not yet supported on Docker for Mac. If you are using IPv6, and haven't upgraded to Beta 24 or v1.12.1 stable or newer, you will see a network
timeout when you run `docker` commands that need access to external network
servers. The aforementioned releases include a workaround for this because
Docker for Mac does not yet support IPv6. See "IPv6 workaround to auto-filter DNS addresses" in
[Workarounds for common problems](#workarounds-for-common-problems).
* You might encounter errors when using `docker-compose up` with Docker for Mac (`ValueError: Extra Data`). We've identified this is likely related to data and/or events being passed all at once rather than one by one, so sometimes the data comes back as 2+ objects concatenated and causes an error.
<p></p>
* Force-ejecting the `.dmg` after running `Docker.app` from it results in an unresponsive whale in the menu bar, Docker tasks "not responding" in activity monitor, helper processes running, and supporting technologies consuming large percentages of CPU. Please reboot, and then re-start Docker for Mac. If needed,`force quit` any Docker related applications as part of the reboot.
<p></p>
* Docker does not auto-start on login even when it is enabled in <img src="../images/whale-x.png"> --> **Preferences**. This is related to a set of issues with Docker helper, registration, and versioning.
<p></p>
* Docker for Mac uses the `HyperKit` hypervisor (https://github.com/docker/hyperkit) in Mac OS X 10.10 Yosemite and higher. If you are developing with tools that have conflicts with `HyperKit`, such as [Intel Hardware Accelerated Execution Manager (HAXM)](https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/), the current workaround is not to run them at the same time. You can pause `HyperKit` by quitting Docker for Mac temporarily while you work with HAXM. This will allow you to continue work with the other tools and prevent `HyperKit` from interfering.
<p></p>
* If you are working with applications like [Apache Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables, specify these to connect to Docker instances through Unix sockets. For example:
export DOCKER_HOST=unix:///var/run/docker.sock
* `docker-compose` 1.7.1 performs DNS unnecessary lookups for `localunixsocket.local` which can take 5s to timeout on some networks. If `docker-compose` commands seem very slow but seem to speed up when the network is disabled (e.g. when disconnected from wifi), try appending `127.0.0.1 localunixsocket.local` to the file `/etc/hosts`.
Alternatively you could create a plain-text TCP proxy on localhost:1234 using:
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:1234:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock
and then `export DOCKER_HOST=tcp://localhost:1234`.
<p></p>
<a name="bind-mounted-dirs"></a>
* There are a number of issues with the performance of directories
bind-mounted with `osxfs`. In particular, writes of small blocks, and
traversals of large directories are currently slow. Additionally,
containers that perform large numbers of directory operations, such as
repeated scans of large directory trees, may suffer from poor
performance. Applications that behave in this way include:
- `rake`
- `ember build`
- Symfony
- Magento
As a work-around for this behavior, you can put vendor or third-party library directories in Docker volumes, perform temporary file system
operations outside of `osxfs` mounts, and use third-party tools like
Unison or `rsync` to synchronize between container directories and
bind-mounted directories. We are actively working on `osxfs`
performance using a number of different techniques and we look forward
to sharing improvements with you soon.
<p></p>
* If your system does not have access to an NTP server, then after a hibernate the time seen by Docker for Mac may be considerably out of sync with the host. Furthermore, the time may slowly drift out of sync during use. To manually reset the time after hibernation, run:
docker run --rm --privileged alpine hwclock -s
Or, to resolve both issues, you can add the local clock as a low-priority (high stratum) fallback NTP time source for the host. To do this, edit the host's `/etc/ntp-restrict.conf` to add:
server 127.127.1.1 # LCL, local clock
fudge 127.127.1.1 stratum 12 # increase stratum
Then restart the NTP service with:
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,38 @@
<!--[metadata]>
+++
title = " Example Applications"
description = "Docker for Mac and Docker for Windows Tutorials"
keywords = ["mac, windows, examples, Compose"]
[menu.main]
identifier="docker-win-examples"
parent="pinata_win_menu"
weight="5"
+++
<![end-metadata]-->
# Example Applications
Upcoming releases will include example applications especially tailored for Docker for Mac and Docker for Windows.
Examples will highlight develop, build, and run workfows in several languages, including Node.js, Python, Ruby, and Java.
For now, if you want get started experimenting with the Beta apps and Docker Compose (which is installed automatically with Docker Desktop Editions), have a look at these example applications in the Compose documentation. You should be able to run these with Docker for Mac and Docker for Windows.
<a href=https://docs.docker.com/compose/django/ target="_blank">Quickstart: Compose and Django</a>
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
<a href=https://docs.docker.com/compose/wordpress/ target="_blank">Quickstart: Compose and WordPress</a>
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, runnning containers, networking, managing data, and storing images on Docker Hub.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

View File

@ -0,0 +1,153 @@
<!--[metadata]>
+++
title = "FAQs"
description = "Frequently asked questions"
keywords = ["windows faqs"]
[menu.main]
identifier="docker-windows-faqs"
parent="pinata_win_menu"
weight = 4
+++
<![end-metadata]-->
# Frequently Asked Questions (FAQs)
>**Looking for popular FAQs on Docker for Windows?** Check out the [Docker
Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs,
technical support for various subscription levels, and more.
### Questions about stable and beta channels
**Q: How do I get the stable or beta version of Docker for Windows?**
A: Use the download links for the channels given in the topic [Download Docker
for Windows](index.md#download-docker-for-windows).
This topic also has more information about the two channels.
**Q: What is the difference between the stable and beta versions of Docker for Windows?**
A: Two different download channels are available for Docker for Windows:
* The stable channel provides a general availability release-ready installer for a fully baked and tested, more reliable app. The stable version of Docker for Windows comes with the latest released version of Docker Engine. The release schedule is synched with Docker Engine releases and hotfixes.
* The beta channel provides an installer with new features we are working on, but is not necessarily fully tested. It comes with the experimental version of Docker Engine. Bugs, crashes and issues are more likely to occur with the beta app, but you get a chance to preview new functionality, experiment, and provide feedback as the apps evolve. Releases are typically more frequent than for stable, often one or more per month.
**Q: Can I switch back and forth between stable and beta versions of Docker for Windows?**
A: Yes, you can switch between versions to try out the betas to see what's new,
then go back to stable for other work. However, **you can have only one app
installed at a time**. Switching back and forth between stable and beta apps can
de-stabilize your development environment, particularly in cases where you
switch from a newer (beta) channel to older (stable).
For example, containers created with a newer beta version of Docker for Windows
may not work after you switch back to stable because they may have been created
leveraging beta features that aren't in stable yet. Just keep this in mind as
you create and work with beta containers, perhaps in the spirit of a playground
space where you are prepared to troubleshoot or start over.
<font color="#CC3366">To safely switch between beta and stable versions be sure
to save images and export the containers you need, then uninstall the current
version before installing another. The workflow is described in more detail
below.</font><br>
Do the following each time:
1. Use `docker save` to save any images you want to keep. (See
[save](/engine/reference/commandline/save.md) in the Docker Engine command line
reference.)
2. Use `docker export` to export containers you want to keep. (See
[export](/engine/reference/commandline/export.md) in the Docker Engine command
line reference.)
3. Uninstall the current app (whether stable or beta).
4. Install a different version of the app (stable or beta).
### What kind of feedback are we looking for?
Everything is fair game. We'd like your impressions on the download-install
process, startup, functionality available, the GUI, usefulness of the app,
command line integration, and so on. Tell us about problems, what you like, or
functionality you'd like to see added.
We are especially interested in getting feedback on the new swarm mode described
in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
[tutorial](/engine/swarm/swarm-tutorial/index.md).
### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on [Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues) or create a new one. You can also create new issues based on diagnostics. To learn more about running diagnostics and about Docker for Windows GitHub issues, see [Diagnose and Feedback](index.md#diagnose-and-feedback).
[Docker for Windows forum](https://forums.docker.com/c/docker-for-windows) provides discussion threads as well, and you can create discussion topics there, but we recommend using the GitHub issues over the forums for better tracking and response.
### Can I use Docker for Windows with new swarm mode?
Yes! You can use Docker for Windows to test single-node features of [swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including initializing a swarm with a single node, creating services, and scaling services. Docker “Moby” on Hyper-V will serve as the single swarm node. You can also use Docker Machine, which comes with Docker for Windows, to create and experiment with a multi-node swarm. Check out the tutorial at [Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
### How do I connect to the remote Docker Engine API?
You might need to provide the location of the remote API for Docker clients and development tools.
On Docker for Windows, clients can connect to the Docker Engine through a **named pipe**: `npipe:////./pipe/docker_engine`, or **TCP socket** at this URL: `http://localhost:2375`.
This sets `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables to the given values (for the named pipe or TCP socket, whichever you use).
See also [Docker Remote API](/engine/reference/api/docker_remote_api.md) and the Docker for Windows forums topic [How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988).
### Why doesn't `nodemon` pick up file changes in a container mounted on a shared drive?
Currently, `inotify` does not work on Docker for Windows. This is a known issue.
For more information and a temporary workaround, see [inotify on shared drives
does not work](troubleshoot.md#inotify-on-shared-drives-does-not-work) in
[Troubleshooting](troubleshoot.md).
### Why does Docker for Windows sometimes lose network connectivity (e.g., `push`/`pull` doesn't work)?
Networking is not yet fully stable across network changes and system sleep
cycles. Exit and start Docker to restore connectivity.
### Can I use VirtualBox alongside Docker 4 Windows?
Unfortunately, VirtualBox (and other hypervisors like VMWare) cannot run when
Hyper-V is enabled on Windows.
### Why is Windows 10 Home not supported?
Docker for Windows requires the Hyper-V Windows feature which is not
available on Home-edition.
### Why is Windows 10 required?
Docker for Windows uses Windows Hyper-V. While older Windows versions have
Hyper-V, their Hyper-V implementations lack features critical for Docker for
Windows to work.
### Why does Docker for Windows fail to start when firewalls or anti-virus software is installed?
Comodo Firewall currently is incompatible with Hyper-V and some Windows 10 builds (possibly, the Anniversary Update), which impacts Docker for Windows. Other firewalls and anti-virus software might also be incompatible with these Microsoft Windows 10 buids. See details and workarounds in [Docker fails to start when Comodo Firewall is installed](troubleshoot.md#docker-fails-to-start-when-comodo-firewall-is-installed) in [Troubleshooting](troubleshoot.md).
### How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker for Windows, and want to uninstall it. For
details on how to perform a clean uninstall of Toolbox on Windows, see [How to
uninstall Toolbox](/toolbox/toolbox_install_windows.md#how-to-uninstall-toolbox)
in the Toolbox Windows topics.
<hr style="color:#99CC99" />
<ul class="media">
<div class="media_content">
<div data-mh="mh_docker_projects">
<h6> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback"><img src="../../images/chat.png" alt="chat icon"></a> <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">Help improve the documentation</a></h3>
<p>
Email us at <a href="mailto:feedback@docker.com?subject=Docker%20Feedback">feedback@docker.com</a>
</p>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Some files were not shown because too many files have changed in this diff Show More