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

feat: rootfs - build/upload action and Dockerfile #125

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

ginglis13
Copy link
Contributor

@ginglis13 ginglis13 commented Jul 21, 2023

Issue #, if available:

runfinch/finch#492

Description of changes:

In order to facilitate Finch on Windows, we need a root filesystem. We will use this Dockerfile as a basis for that root filesystem - using docker export to turn a built container into an archived rootfs. For the scope of these changes, create the Dockerfile and an action that runs on changes to the file to build and push to ECR repo.

The Dockerfile will be used to create a container such that we can export that container's fs as a tarball and compress it for use with WSL2. For now, we are including cloud-init (at least for the WSL2 rootfs) but need further investigation to determine if we can remove the package to further slim the rootfs..

In order to create the container used as an intermediate step to export
its rootfs, we need to tell buildkit to load the image into Docker. See
This exposes a limitation of buildkit to load multiplatform images:

buildx failed with: ERROR: docker exporter does not currently support exporting manifest lists

thus why the action runs two build-rootfs-image jobs - one for each arch.

See docker/buildx#59 and docker/roadmap#371

Additionally, network performance of the arm64 build is quite slow -
downloads of packages via dnf are on the scale of kb/s (but this has not
been observed on Ubuntu or Alpine images)

Testing done:

Local copy in a private repo, act

  • I've reviewed the guidance in CONTRIBUTING.md

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ginglis13 ginglis13 self-assigned this Jul 21, 2023
@ginglis13 ginglis13 force-pushed the rootfs-dockerfile branch 11 times, most recently from bf05eef to 3079cc4 Compare July 21, 2023 23:23
@ginglis13
Copy link
Contributor Author

GitHub secrets are not evaluated on PRs from forks (so as not to allow for bad actors to expose secrets). I've updated the PR to be ready for review, but it the action won't run until merge.

@ginglis13 ginglis13 marked this pull request as ready for review July 21, 2023 23:23
@ginglis13 ginglis13 changed the title [DRAFT] feat: rootfs - build/upload action and Dockerfile feat: rootfs - build/upload action and Dockerfile Jul 21, 2023
.github/workflows/rootfs.yaml Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
.github/workflows/rootfs.yaml Outdated Show resolved Hide resolved
In order to facilitate Finch on Windows, we need a root filesystem. We
will use this Dockerfile as a basis for that root filesystem - using
`docker export` to turn a built container into an archived rootfs. For
the scope of these changes, create the Dockerfile and an action that
runs on changes to the file to build and push to ECR repo.

In order to create the container used as an intermediate step to export
its rootfs, we need to tell buildkit to load the image into Docker. This
exposes a limitation of buildkit to load multiplatform images, thus why
the action runs two build-rootfs-image jobs - one for each arch.

Additionally, network performance of the arm64 build is quite slow -
downloads of packages via dnf are on the scale of kb/s (but this has not
been observed on Ubuntu or Alpine images)

Signed-off-by: Gavin Inglis <[email protected]>
@ginglis13
Copy link
Contributor Author

CI failing for known reason described in runfinch/finch#461 (comment)

@ginglis13 ginglis13 merged commit 865cbfe into runfinch:main Jul 27, 2023
3 of 7 checks passed
@ginglis13
Copy link
Contributor Author

Missing auth in https://github.com/runfinch/finch-core/actions/runs/5684511073/job/15407368457:

no basic auth credentials

Need to ecr-login - working on a follow up.

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.

3 participants