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

airbyte-ci: refactor gradle containers, use amazoncorretto #30384

Merged
merged 15 commits into from
Sep 13, 2023
Prev Previous commit
Next Next commit
use fuse-overlayfs
  • Loading branch information
Marius Posta committed Sep 13, 2023
commit fe5e2c80bf9eea42578aa29a2623d8876ca15a24
25 changes: 12 additions & 13 deletions airbyte-ci/connectors/pipelines/pipelines/actions/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,24 +477,23 @@ def with_global_dockerd_service(dagger_client: Client) -> Container:
# This won't be possible because of container-ception: dind is running inside the dagger engine.
# See https://github.com/krallin/tini#subreaping for details.
.with_env_variable("TINI_SUBREAPER", "")
# Expose the docker host port.
.with_exposed_port(2375)
# Mount the docker cache volumes.
.with_mounted_cache("/tmp", dagger_client.cache_volume("shared-tmp"), sharing=CacheSharingMode.PRIVATE)
# Mount /var/lib/docker so docker writes to the host file system, i.e. the dagger engine.
.with_mounted_cache("/var/lib/docker", dagger_client.cache_volume("shared-var-lib-docker"), sharing=CacheSharingMode.PRIVATE)
# Run the docker daemon and bind it to the exposed TCP port.
# Similarly, because of container-ception, we have to use the fuse-overlayfs storage engine.
.with_exec(
sh_dash_c(
[
# We just want /var/lib/docker to be mounted as a volume, never mind the caching. We'd rather it be empty.
"(cd /var/lib/docker; rm -rf -- ..?* .[!.]* *)",
# Start the docker daemon.
"dockerd --log-level=error --host=tcp://0.0.0.0:2375 --tls=false",
"apk update"
"apk add fuse-overlayfs"
"mkdir /etc/docker"
"(echo {\\\"storage-driver\\\": \\\"fuse-overlayfs\\\"} > /etc/docker/daemon.json)"
]
),
insecure_root_capabilities=True,
)
)
# Expose the docker host port.
.with_exposed_port(2375)
# Mount the docker cache volumes.
.with_mounted_cache("/tmp", dagger_client.cache_volume("shared-tmp"), sharing=CacheSharingMode.PRIVATE)
# Run the docker daemon and bind it to the exposed TCP port.
.with_exec(["dockerd", "--log-level=error", "--host=tcp://0.0.0.0:2375", "--tls=false"], insecure_root_capabilities=True)
)


Expand Down