Before this, docker compose would always first pull the `docs/docstage`
image from docker hub, then build the local docs:
Before this:
```
docker compose up
[+] Running 1/12
⠿ docs Pulled 11.1s
⠧ 706c320525cd Download complete 8.7s
⠴ 4f98bba63633 Download complete 7.5s
⠇ 4f4fb700ef54 Exists 4.8s
⠇ a47abff02990 Download complete 4.8s
⠧ ab1af07f990a Download complete 4.7s
⠧ bd5777bb8f79 Download complete 4.7s
⠧ 8b79b42c3524 Download complete 4.7s
⠧ d4b8ebd00804 Download complete 4.7s
⠧ f1398ae18173 Download complete 4.7s
⠧ 9981e73032c8 Download complete 4.7s
⠧ e5f90f35b4bc Download complete 4.7s
[+] Building 69.1s (15/20)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 196B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.85kB 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 2.2s
...
```
With this patch, the `docs pulled` step is skipped, and we start building
immediately:
```
docker compose up
[+] Building 6.7s (11/20)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 196B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
...
```
Perhaps compose does this as it was to help with caching when building
with the legacy builder, but BuildKit does not use local images for
caching, so we don't need to do so (I'm planning to open a ticket in
compose to discuss this).
As we're using this compose-file to build the docs (not to view some
older version), let's disable pulling, so that we're always building.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Dockerfile: add option to enforce git log history for local dev
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* jekyll(last_modified_at): do not override if already set with frontmatter
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* jekyll(last_modified_at): use data files for commands reference instead of stub file
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* fix broken links
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
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>
This patch updates the default configuration to match a "development"
situation, and introduces build-options to produce a "production"
build.
By default (dev environment):
- Google Analytics / GTM and PollDaddy are disabled
- SASS builds non-minified stylesheets (for easier readabililty)
- Excludes "enterprise" stubs
Building a "production" build locally is still possible by overriding
the `JEKYLL_ENV` build-arg;
JEKYLL_ENV=production docker-compose up --build
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The current target didn't have jekyll installed, so mounting the
source-files didn't do anything.
This patch removes the bind-mount.
Alternatively, we could switch back to using a jekyll stage (with
automatic rebuilding).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also fix regeneration. The starefossen/github-pages image had
--force_polling set to poll the filesystem, but this didn't
seem to work. Docker for Mac/Windows supports filesystem events,
so it now uses this instead.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
server and signer, and set these to be the default configuration
files when running the images.
Compose specifies the configuration with MySQL.
Signed-off-by: Ying Li <ying.li@docker.com>
Add a service name and ephemeral ports to notary server.
Remove certs as TLS is terminated in the ELB.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>