Coder Social home page Coder Social logo

Comments (2)

Tiryoh avatar Tiryoh commented on August 25, 2024

Hi @takasehideki,

Thank you for the feedback. I welcome your proposed pull request.

For the record, I'll answer your question. The purpose of the command rm /etc/apt/apt.conf.d/docker-clean is to enable auto-completion with the apt install command inside the container's bash. There's no profound reason for the comments in the Dockerfile being added in a separate commit, though they should ideally have been included in the same commit.

Leaving the docker-clean file results in the inability to use auto-completion with the apt install command after running apt update inside the container. This Dockerfile is designed for setting up and using a test environment, and having bash auto-completion available inside the container was considered beneficial for both me and the users.

However, I had not fully taken into account the impact on the image size. I agree that keeping the image size as small as possible is desirable. For now, I'll work on reducing the image size. Afterward, I'm thinking of considering adding rm /etc/apt/apt.conf.d/docker-clean to entrypoint.sh or something similar.

from docker-ros2-desktop-vnc.

takasehideki avatar takasehideki commented on August 25, 2024

@Tiryoh thank you so much for your kind explanation!
First, in my conclusion, the command RUN rm /etc/apt/apt.conf.d/docker-clean should be moved to the later stage of the Dockerfile. I hope you like my PR #153 about this.

It would certainly be useful to realize apt-get auto-completion. My first suggestion of just removing this command would not allow the auto-completion even after doing apt update. According to this page, it seems that docker-clean should be removed to realize apt-get auto-completion. By moving this command to the later, I confirmed that the auto-completion could be kept after running apt update in the container, while greatly reducing the size of the Docker image (6.33 GB as indicated in my initial proposal).
One strange thing is that auto-completion in apt install was enabled in the original Docker image without doing apt update. This feature is lost by moving the command with my commit. However, I don't think it's a matter, because we can't operate apt install without doing apt update in the first place, and it's natural to operate apt update first if we want to install a new package in a Docker container.

from docker-ros2-desktop-vnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.