Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the Docker in Docker feature configuration #129

Merged

Conversation

StevenMaude
Copy link
Contributor

@StevenMaude StevenMaude commented May 29, 2024

Fixes #127.

This PR removes the Docker in Docker dev container feature configuration to simplify the devcontainer.json.

Much of the configuration simply restates the feature defaults.

This was all created by Visual Studio Code originally; see ef7549f.

See the commit messages for more detail.

These four removed options are currently the default configuration for
the feature.

If we need to override the defaults in future, then we should do that.

Reference:

https://github.com/devcontainers/features/blob/f5787eed01022f177475a99084327e023a84ddaf/src/docker-in-docker/README.md

These explicit options were added in ef7549f
and that in turn was because Visual Studio Code added them in when
creating the dev container configuration.

For context,

* `moby` specifies whether use Moby instead of Docker CE
* `version` specifies the Moby/Docker CE version
* `azureDnsAutoDetection` sets the DNS server for `dockerd` if running
  in Azure (Actions runners are hosted in Azure, not sure if this
  setting makes any difference for our use)
* `installDockerBuildx`: installs Docker Buildx (which is used by Docker
  Buildkit); not convinced there's anywhere we use this for OpenSAFELY
  CLI, but it shouldn't do any harm to have it installed
This setting came from it being added via Visual Studio Code in
ef7549f.

The latest is currently v2.

Also don't know of any reason why we currently would want to pin this: I'm
not aware that we use Docker Compose whether in our research-template setup,
or in tools like OpenSAFELY CLI.
@StevenMaude
Copy link
Contributor Author

StevenMaude commented May 29, 2024

The one thing from this I learned is that we're using Moby and not Docker CE.

I'm not sure that matters too much as the two are closely related, but we could explicitly choose Docker if we like.

@StevenMaude
Copy link
Contributor Author

StevenMaude commented May 29, 2024

My suggested minimal acceptance criteria for such a change are that the following work as expected:

  • ehrQL autocompletion
  • opensafely run run_all
  • can connect to R Studio server

@StevenMaude StevenMaude merged commit 84460d4 into main May 29, 2024
1 check passed
@StevenMaude StevenMaude deleted the steve/remove-explicit-docker-in-docker-configuration branch May 29, 2024 13:30
StevenMaude added a commit to opensafely/ehrql-tutorial that referenced this pull request Aug 14, 2024
We dropped this for the research-template.

See opensafely/research-template#129.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove most of the docker-in-docker dev container feature options
2 participants