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

1898 byoi #1912

Merged
merged 14 commits into from
Oct 24, 2023
Merged

1898 byoi #1912

merged 14 commits into from
Oct 24, 2023

Conversation

jimmykarily
Copy link
Contributor

@jimmykarily jimmykarily commented Oct 11, 2023

Fixes #1898

@jimmykarily jimmykarily force-pushed the 1898-byoi branch 7 times, most recently from a307a55 to c1d4dbf Compare October 19, 2023 06:45
@jimmykarily jimmykarily force-pushed the 1898-byoi branch 6 times, most recently from 2b73df5 to 5afe742 Compare October 23, 2023 17:47
images/Dockerfile.ubuntu Outdated Show resolved Hide resolved
mauromorales and others added 4 commits October 24, 2023 09:51
Fixes #1898

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
@jimmykarily jimmykarily marked this pull request as ready for review October 24, 2023 06:52
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
moved here: #1897 (comment)

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Copy link
Member

@mauromorales mauromorales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👏

@Itxaka Itxaka requested a review from a team October 24, 2023 08:17
Earthfile Show resolved Hide resolved
Earthfile Show resolved Hide resolved
Earthfile Show resolved Hide resolved
Earthfile Show resolved Hide resolved
Earthfile Show resolved Hide resolved
SAVE ARTIFACT --keep-own /. rootfs

uki-artifacts:
ARG --required FAMILY # The dockerfile to use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, cant we make this a global thing instead of having them in each target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not. Anything we make global becomes accessible to every target, even those that don't need it. Then you can't make it --required either (since it's not required by all targets, right?). It looks ugly right now but I'm hoping on the next iteration, the only thing most targets will need is the a "base image" arg which will be a pre-built image. That one will be build directly with docker to ensure that we can always build with just docker, no earthly required.

FROM base-ubuntu-22-lts AS arm64-ubuntu
FROM base-ubuntu-22-lts AS arm64-ubuntu-22-lts
FROM base-ubuntu-20-lts AS arm64-ubuntu-20-lts
FROM base-ubuntu-22.04 AS arm64-ubuntu-23.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again from 22 to 23?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mauromorales did I mess up on rebase?

images/Dockerfile.ubuntu Outdated Show resolved Hide resolved
@@ -604,10 +644,21 @@ iso:


iso-uki:
FROM ubuntu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ubuntu? A smaller image like alpine is better suited for this, especially if its just to run a script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpine had no bash:

~/workspace/kairos/kairos (1898-byoi)*$ docker run -it --rm alpine /bin/bash
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown.

We could implement the script in pure sh but we opted for an image that has bash.

naming.sh Show resolved Hide resolved
Earthfile Show resolved Hide resolved
Copy link
Member

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some changes in regard to framework target and dockerfiles

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Copy link
Member

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
when creating a tag for container images.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
because otherwise it fails to build rpi images

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <jimmykarily@gmail.com>
@jimmykarily jimmykarily merged commit 664c96f into master Oct 24, 2023
10 of 11 checks passed
@jimmykarily jimmykarily deleted the 1898-byoi branch October 24, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Dockefiles should separate the base image from the "build strategy" (aka flavor)
3 participants