This updates the instructions in the docker-compose.yml to use "docker compose" (v2) instead of "docker-compose". Also removing a workaround for a bug in older versions of compose, where build-args did not properly inherit their value from the current environment. Testing this scenario on a current version of compose shows that that problem has been resolved: Using this compose-file: ```yaml services: docs: build: args: - JEKYLL_ENV context: . ``` And this Dockerfile: ```dockerfile ARG JEKYLL_ENV=default FROM alpine ARG JEKYLL_ENV RUN echo $JEKYLL_ENV >> /result.txt CMD cat /result.txt ``` It looks like this issue has been resolved: Without setting the `JEKYLL_ENV` environment variable, the Dockerfile correctly uses the default value from the Dockerfile: ```console docker compose build [+] Building 0.6s (6/6) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 31B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/alpine:latest 0.0s => CACHED [1/2] FROM docker.io/library/alpine 0.0s => [2/2] RUN echo default >> /result.txt 0.3s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:c22cfa2355a910991d1bd4f4d83a0b9d4fad7dc73b1ea83fba05f8949e564591 0.0s => => naming to docker.io/library/composeenv_docs 0.0s docker compose run --rm docs default ``` And when setting `JEKYLL_ENV`, it's used to override the default in the Dockerfile: ```console JEKYLL_ENV=production docker compose build [+] Building 2.6s (6/6) FINISHED => [internal] load build definition from Dockerfile 0.5s => => transferring dockerfile: 120B 0.0s => [internal] load .dockerignore 0.4s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/alpine:latest 0.0s => [1/2] FROM docker.io/library/alpine 0.0s => [2/2] RUN echo production >> /result.txt 1.6s => exporting to image 0.1s => => exporting layers 0.1s => => writing image sha256:a05ca33d07d411660bd26f817a3d9201f3d7f15d198879cadc70e83e5d1f7fd5 0.0s => => naming to docker.io/library/composeenv_docs 0.0s docker compose run --rm docs production ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.docker | ||
.github | ||
_data | ||
_deploy/nginx | ||
_includes | ||
_layouts | ||
_plugins | ||
_samples/library | ||
_scripts | ||
_scss | ||
buildx | ||
ci-cd | ||
cloud | ||
compose | ||
config | ||
css | ||
datacenter | ||
desktop | ||
develop | ||
docker-hub | ||
docker-id | ||
ee | ||
engine | ||
favicons | ||
fonts | ||
get-started | ||
go | ||
images | ||
js | ||
kitematic | ||
language | ||
machine | ||
network | ||
opensource | ||
reference | ||
registry | ||
release-notes | ||
samples | ||
security | ||
single-sign-on | ||
storage | ||
subscription | ||
tests | ||
toolbox | ||
.dockerignore | ||
.editorconfig | ||
.env | ||
.eslintignore | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.markdownlint.json | ||
.nojekyll | ||
.prettierignore | ||
.ruby-version | ||
404.html | ||
404.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
Gemfile | ||
LICENSE | ||
Makefile | ||
README.md | ||
_config.yml | ||
_config_production.yml | ||
_website-config-docs-stage.json | ||
_website-config-docs.json | ||
components.md | ||
docker-compose.yml | ||
docsarchive.md | ||
favicon.ico | ||
get-docker.md | ||
glossary.md | ||
google161104f9fdea6089.html | ||
googlecbe7fee896be512c.html | ||
index.html | ||
index.md | ||
robots.txt | ||
search.md | ||
test.md |
README.md
Docs @ Docker

Welcome to the Docker Documentation repository. 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 the Docker community!
Provide feedback
We’d love to hear your feedback. Please file documentation issues only in the docs GitHub repository. You can file a new issue to suggest improvements or if you see any errors in the existing documentation.
Before submitting a new issue, check whether the issue has already been reported. You can join the discussion using an emoji, or by adding a comment to an existing issue. If possible, we recommend that you suggest a fix to the issue by creating a pull request.
You can ask general questions and get community support through the Docker Community Slack. Personalized support is available through the Docker Pro, Team, and Business subscriptions. See Docker Pricing for details.
If you have an idea for a new feature or behavior change in a specific aspect of Docker, or have found a product bug, file that issue in the project's code repository.
We've made it really easy for you to file new issues.
- Click New issue on the docs repository and fill in the details, or
- Click Request docs changes in the right column of every page on docs.docker.com and add the details.
Contribute to Docker docs
We value your contribution. We'd like to make it as easy as possible to submit
your contributions to the Docker docs repository. Changes to the docs are
handled through pull requests against the master
branch. To learn how to
contribute, see CONTRIBUTING.md.
Copyright and license
Copyright 2013-2022 Docker, inc, released under the Apache 2.0 license.