Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • aports aports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 739
    • Issues 739
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 321
    • Merge requests 321
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpinealpine
  • aportsaports
  • Issues
  • #10285
Closed
Open
Issue created Apr 18, 2019 by Roi Greenberg@roigreenberg

Removing packages when creating alpine image

Hi.
In our work, we need custom Alpine docker and for that we need to remove some packages from the final image[minirootfs] (basically, anything that related to network/ssl)

We try to remove the packages from the container itself from inside, but doing “apk del ssl_client” for example, do nothing.

We also tried to edit the genrootfs script so after adding all the packages it will delete those we don’t want, but if I do:

<code class="text">
${APK:-apk} del --keys-dir "$keys_dir" \
        --repositories-file "$repositories_file" \
        *--root "$tmp"* $unwanted_packages
</code>

The script crash, and if I remove —root “$tmp” I receive permissions error, probably since it tries to delete the container packages.

Is there any way to accomplish what we want? maybe prevent “apk add” to install those packages?

(from redmine: issue id 10285, created on 2019-04-18)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking