40 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
4f6a42110e compose-file: prevent pulling old docs/docstage image
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>
2022-12-07 12:45:17 +01:00
CrazyMax
4544982b55 jekyll(last_modified_at): fix for remote resources and data files (#15998)
* 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>
2022-10-31 09:01:42 +01:00
CrazyMax
614c4a7000 jekyll: enable sitemap and local search for dev environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 19:30:46 +02:00
Sebastiaan van Stijn
324db4e44a update docker-compose.yml for compose v2, and remove temporary fix
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>
2022-04-07 12:38:44 +02:00
Usha Mandya
84ee510dfd Remove Compose file version from the yaml file
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
2021-09-22 10:54:40 +01:00
Sebastiaan van Stijn
5a1ae8310f Separate "development" and "production" configurations
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>
2020-10-22 15:41:15 +02:00
Sebastiaan van Stijn
3f7cab652d Dockerfile: disable archives by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 13:25:54 +02:00
Sebastiaan van Stijn
ebc86d840a compose file: use v3 and no volume
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>
2020-02-24 13:56:22 +01:00
Sebastiaan van Stijn
24c0299e4e compose file: disable archives by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 13:56:20 +01:00
Trapier Marshall
baaea2dcbd remind compose file how to build
Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
2018-05-03 16:08:48 -07:00
Ben Firshman
7da61ffa50 Add Compose file for development
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>
2016-10-05 19:34:31 +01:00
Misty Stanley-Jones
701f170a21 Move docker-hub docs to docker-hub subdirectory 2016-09-29 10:38:52 -07:00
Misty Stanley-Jones
4d1a62276e Imitial import of https://github.com/docker/hub2-demo 2016-09-29 10:35:53 -07:00
Misty Stanley-Jones
9c69f388c5 Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
Andrew Hsu
82e15cc82c rename docker-compose network for mysql
Signed-off-by: Andrew Hsu <andrewhsu@acm.org>
2016-06-01 07:54:46 +00:00
Andrew Hsu
6458d1f50f convert docker compose files to v2
Signed-off-by: Andrew Hsu <andrewhsu@acm.org>
2016-05-26 23:16:30 +00:00
Ying Li
c7fd4d8fd3 Try a simplified CircleCI with just Docker commands.
Signed-off-by: Ying Li <ying.li@docker.com>
2016-05-25 16:00:56 -07:00
Ying Li
9371c49b59 Move the SERVICE_NAME environment variable definitions into the server/signer Dockerfiles
Signed-off-by: Ying Li <ying.li@docker.com>
2016-05-18 05:29:28 -05:00
Ying Li
a021d16392 Convert the server and signer to use the alpine image and to remove apks after build
Signed-off-by: Ying Li <ying.li@docker.com>
2016-04-04 15:08:59 -07:00
David Lawrence
7a751e5f78 lots of final minor improvements to setup.
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-08 14:18:07 -08:00
David Lawrence
3cf000a852 use named volume and fix env service names
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-05 17:40:23 -08:00
David Lawrence
e891420d53 make better use of the repo already copied into the containers
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-04 18:02:19 -08:00
David Lawrence
3cf25b9bbb automigrate when using compose file
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-04 10:39:40 -08:00
David Lawrence
6442640718 switching over to offical mariadb image
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-02-04 10:39:40 -08:00
David Lawrence
0350d56176 renaming dockerfiles for autobuilds
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2016-01-12 18:05:21 -08:00
Diogo Monica
fd01151cd2 Adding a volume to MYSQL to ensure data persistence
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-12-11 16:37:54 -08:00
Ying Li
56e8d864ce Add some standalone (does not require MySQL) configuration files for
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>
2015-11-30 14:14:16 -08:00
Jessica Frazelle
4e59ed05bc better named dockerfiles and upgrade to go 1.5.1
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-29 17:18:43 -07:00
David Lawrence
70f9f3277a viper config for notary signer
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-07-27 17:33:11 -07:00
Richard Scothern
e5d6180276 Enable remote signing service
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-16 11:16:40 -07:00
Richard Scothern
df18a541e2 Fix the staging deployment.
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>
2015-07-16 09:50:52 -07:00
Diogo Monica
394237cfe6 Adding link to notary-signer in dockerfile
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-14 15:57:11 -07:00
Diogo Monica
657150ca9b Working docker build/docker compose
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-07-14 15:46:21 -07:00
Nathan McCauley
e46a95227c rename vetinari to notary
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-06-19 11:01:19 -07:00
Diogo Monica
e98a25c94f Fixed Dockerfile and compose 2015-06-18 14:07:02 -07:00
Diogo Monica
0ee61e25c9 Added Dockerfiles, changed compose 2015-06-18 01:22:15 -07:00
Diogo Monica
0f6c4799aa Changing compose and logging 2015-04-28 22:53:09 -07:00
Nathan McCauley
95adc15e36 debugging stuffz 2015-04-28 11:22:10 -07:00
Nathan McCauley
5938d9e09c add CA config option 2015-04-28 11:22:10 -07:00
Nathan McCauley
c043e6d5a3 Initial docker-compose config for rufus/vetinari integration 2015-04-28 11:22:09 -07:00