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

Commits on Apr 4, 2024

  1. Dockerfile: reformat multiline commands

    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>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    659c2bd View commit details
    Browse the repository at this point in the history
  2. Dockerfile: apt cleanup should occur with install

    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>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a208fe2 View commit details
    Browse the repository at this point in the history
  3. Dockerfile: remove duplicate sections

    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>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    fec0931 View commit details
    Browse the repository at this point in the history
  4. Dockerfile: use python-is-python3 instead

    Use python-is-python3 instead of manually tweaking alternatives entries.
    
    Signed-off-by: Randolph Sapp <rs@ti.com>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c1de18f View commit details
    Browse the repository at this point in the history
  5. Dockerfile: bind mount build-env.sh in run

    Bind mount this script instead of copying it in. Cuts down on what's
    committed.
    
    Signed-off-by: Randolph Sapp <rs@ti.com>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    1c62cd6 View commit details
    Browse the repository at this point in the history
  6. build-env.sh: verbose downloads

    Had some issues with aria2. Now I want status during builds.
    
    Signed-off-by: Randolph Sapp <rs@ti.com>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    78bf5bb View commit details
    Browse the repository at this point in the history
  7. Dockerfile: add automake dependency

    Required for coccinelle build.
    
    Signed-off-by: Randolph Sapp <rs@ti.com>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    d67f5ee View commit details
    Browse the repository at this point in the history
  8. build-env.sh: purge the pip cache

    Signed-off-by: Randolph Sapp <rs@ti.com>
    StaticRocket committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    54855e9 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. build-env.sh: install toolchains to /opt

    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>
    StaticRocket committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8cb4f58 View commit details
    Browse the repository at this point in the history
  2. all: use entrypoint id remapping instead

    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>
    StaticRocket committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    00bbc47 View commit details
    Browse the repository at this point in the history
  3. kp*: try to preserve relative git paths

    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>
    StaticRocket committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e043a25 View commit details
    Browse the repository at this point in the history
  4. all: purge proxy configurations

    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>
    StaticRocket committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    7e529e0 View commit details
    Browse the repository at this point in the history