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

Dockerfile rework and id remapping #16

Merged
merged 12 commits into from
Apr 23, 2024

Conversation

StaticRocket
Copy link
Contributor

@StaticRocket StaticRocket commented Mar 21, 2024

Reformat the Dockerfile, use entrypoint ID remapping, clean up pip artifacts, fix git submodule/worktree mapping, remove proxies.

@StaticRocket StaticRocket force-pushed the dockerfile-rework branch 2 times, most recently from 3f02307 to 6eb3330 Compare March 23, 2024 17:28
Dockerfile Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
I know this feels cursed, but this is the best way I've seen multiline
commands formatted in a Dockerfile so we're doing that here before
anything else.

Signed-off-by: Randolph Sapp <rs@ti.com>
Every command run creates a new commit. Temporary files must be cleaned
in the same command they are generated in to avoid committing things.

Signed-off-by: Randolph Sapp <rs@ti.com>
We don't need to build 2 different images in the middle of this. There
is substantial overlab between the build tools required to boostrap our
tools in build-env.sh and the build tools required to build the kernel.

Since we clean up after ourselves in build-env.sh there's no reason to
make a temporary build container for this and then rip the entire rootfs
out for the actual kpv container. In addition this prevents accidentally
breaking apt with intermediary state files and clobbering the build
cache.

Signed-off-by: Randolph Sapp <rs@ti.com>
Use python-is-python3 instead of manually tweaking alternatives entries.

Signed-off-by: Randolph Sapp <rs@ti.com>
Bind mount this script instead of copying it in. Cuts down on what's
committed.

Signed-off-by: Randolph Sapp <rs@ti.com>
Had some issues with aria2. Now I want status during builds.

Signed-off-by: Randolph Sapp <rs@ti.com>
Required for coccinelle build.

Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Randolph Sapp <rs@ti.com>
StaticRocket and others added 3 commits April 11, 2024 18:23
Install the toolchains to /opt instead of /usr/local. I noticed in the
shellcheck PR that this was happening but wanted to reserve functional
changes for later. This is the preferred location for these things
anyway.

Signed-off-by: Randolph Sapp <rs@ti.com>
Switch everything to use entrypoint remapping. Use dumb-init to clean up
any potential forks and gosu to switch user and execute command. Gosu is
preferred over standard su because it ignores command line arguments and
handles shell commands as well as binary paths.

This uses the internal user and group "developer".

Signed-off-by: Randolph Sapp <rs@ti.com>
Attempt to handle relative git paths, used by submodules, worktrees, and
other custom git configurations. Fixes nmenon#12.

Signed-off-by: Randolph Sapp <rs@ti.com>
This should not be necessary and should be removed for multiple reasons.
Use the docker proxy config [1] instead.

[1] https://docs.docker.com/network/proxy/

Signed-off-by: Randolph Sapp <rs@ti.com>
@nmenon nmenon merged commit 93e91a6 into nmenon:master Apr 23, 2024
2 checks passed
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.

2 participants