Welcome to the repo for our documentation. This is the source for https://docs.docker.com/.
Feel free to send us pull requests and file issues. Our docs are completely open source and we deeply appreciate contributions from our community!
- Providing feedback
- Contributing
- Per-PR staging on GitHub
- Staging the docs
- Read these docs offline
- Important files
- Relative linking for GitHub viewing
- Beta content disclaimer
- Accessing unsupported archived documentation
- Building archives and the live published docs
- Creating a new archive
- Copyright and license
We really want your feedback, and we've made it easy. You can edit a page or request changes in the right column of every page on docs.docker.com. You can also rate each page by clicking a link at the footer.
Only file issues about the documentation in this repository. One way to think about this is that you should file a bug here if your issue is that you don't see something that should be in the docs, or you see something incorrect or confusing in the docs.
-
If your problem is a general question about how to configure or use Docker, ask in https://forums.docker.com instead.
-
If you have an idea for a new feature or behavior change in a specific aspect of Docker, or have found a bug in part of Docker, file that issue in the project's code repository.
We value your documentation contributions, and we want to make it as easy as possible to work in this repository. One of the first things to decide is which branch to base your work on. If you get confused, just ask and we will help. If a reviewer realizes you have based your work on the wrong branch, we'll let you know so that you can rebase it.
Note: To contribute code to Docker projects, see the Contribution guidelines.
Files and directories listed in the path:
keys in
.NOT_EDITED_HERE.yaml
are maintained in other
repositories and should not be edited in this one. Pull requests against these
files will be rejected. Make your edits to the files in the repository and path
in the source:
key in the YAML file.
Most commits will be made against the master
branch. This include:
- Conceptual and task-based information not specific to new features
- Restructuring / rewriting
- Doc bug fixing
- Typos and grammar errors
One quirk of this project is that the master
branch is where the live docs are
published from, so upcoming features can't be documented there. See
Specific new features for a project
for how to document upcoming features. These feature branches will be periodically
merged with master
, so don't worry about fixing typos and documentation bugs
there.
Do you enjoy creating graphics? Good graphics are key to great documentation, and we especially value contributions in this area.
Our docs cover many projects which release at different times. If, and only if,
your pull request relates to a currently unreleased feature of a project, base
your work on that project's vnext
branch. These branches were created by
cloning master
and then importing a project's master
branch's docs into it
(at the time of the migration), in a way that preserved the commit history. When
a project has a release, its vnext
branch will be merged into master
and your
work will be visible on https://docs.docker.com/.
The following vnext
branches currently exist:
-
vnext-engine: docs for upcoming features in the docker/docker project
-
vnext-compose: docs for upcoming features in the docker/compose project
-
vnext-distribution: docs for upcoming features in the docker/distribution project
-
vnext-swarm: docs for upcoming features in the docker/swarm project
-
vnext-toolbox: docs for upcoming features in the docker/toolbox project
For every PR against master
and all the long-lived branches, a staged version
of the site is built using Netlify. If the site builds, you will see
deploy/netlify — Deploy preview ready. Otherwise, you will see an error.
Click Details to review the staged site or the errors that prevented it from
building. Review the staged site and amend your commit if necessary. Reviewers
will also check the staged site before merging the PR, to protect the integrity
of https://docs.docker.com/.
You have three options:
-
On your local machine, clone this repo and run our staging container:
git clone --recursive https://github.com/docker/docker.github.io.git cd docker.github.io docker-compose up
If you haven't got Docker Compose installed, follow these installation instructions.
The container runs in the background and incrementally rebuilds the site each time a file changes. You can keep your browser open to http://localhost:4000/ and refresh to see your changes. The container runs in the foreground, but you can use
CTRL+C
to get the command prompt back. To stop the container, issue the following command:docker-compose down
-
Install Jekyll and GitHub Pages on your local machine.
a. Clone this repo by running:
git clone --recursive https://github.com/docker/docker.github.io.git
b. Install Ruby 2.3 or later as described in Installing Ruby.
c. Install Bundler:
gem install bundler
d. If you use Ubuntu, install packages required for the Nokogiri HTML parser:
sudo apt-get install ruby-dev zlib1g-dev liblzma-dev
e. Install Jekyll and other required dependencies:
bundle install
Note: You may need to install some packages manually.
f. Change the directory to
docker.github.io
.g. Use the
jekyll serve
command to continuously build the HTML output.The
jekyll serve
process runs in the foreground, and starts a web server running on http://localhost:4000/ by default. To stop it, useCTRL+C
. You can continue working in a second terminal and Jekyll will rebuild the website incrementally. Refresh the browser to preview your changes. -
Build and run a Docker image for your working branch.
$ docker build -t docker build -t docs/docker.github.io:<branch_name> . $ docker run --rm -it -p 4000:4000 docs/docker.github.io:<branch_name>
After the
docker run
command, copy the URL provided in the container build output in a browser, http://0.0.0.0:4000, and verify your changes.
To read the docs offline, you can use either a standalone container or a swarm service. To see all available tags, go to Docker Hub.
The following examples use the latest
tag:
-
Run a single container:
docker run -it -p 4000:4000 docs/docker.github.io:latest
-
Run a swarm service:
docker service create -p 4000:4000 --name localdocs --replicas 1 docs/docker.github.io:latest
This example uses only a single replica, but you could run as many replicas as you'd like.
Either way, you can now access the docs at port 4000 on your Docker host.
< 9E7A div class="markdown-heading" dir="auto">