-
Notifications
You must be signed in to change notification settings - Fork 684
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
Remove software-properties-common from dev container after use #7255
Conversation
During the creation of the devcontainer we need to add a ppa repository, which is easiest done via software-properies-common. As turns out this installes pkexec into the container as a side effect. When vscode tries to attach a debugger it first checks if pkexec is installed as this gives a nicer popup asking for elevation of rights to attach to the process. However, since dev containers don't have a windowing system running pkexec isn't working as expected and thus prevents the debugger from attaching. Without pkexec in the container vscode 'falls back' to plain old sudo which we can run passwordless in the container. For pkexec to be removed we need to first purge software-propertied-common as well as autoremove all packages that were installed due to the installation of said package. By performing this all in one step we minimize the size of the layer we are creating.
@@ -109,7 +113,7 @@ WORKDIR /uncrustify/uncrustify-uncrustify-0.68.1/ | |||
RUN mkdir build | |||
WORKDIR /uncrustify/uncrustify-uncrustify-0.68.1/build/ | |||
RUN cmake .. | |||
RUN make -sj8 | |||
RUN MAKEFLAGS="-j $(nproc)" make -s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, this could have been a separate PR, but YOLO
I just happened to see this was still hardcoded to the arbitrary 8 parallel jobs. It is only applicable during the building of the devcontainer, but this allows bigger github actions to actually do something significant it ever required.
Codecov Report
@@ Coverage Diff @@
## main #7255 +/- ##
==========================================
- Coverage 93.22% 93.21% -0.02%
==========================================
Files 275 275
Lines 59492 59539 +47
Branches 0 7419 +7419
==========================================
+ Hits 55462 55499 +37
- Misses 4030 4040 +10 |
During the creation of the devcontainer we need to add a ppa repository, which is easiest done via software-properies-common. As turns out this installes pkexec into the container as a side effect. When vscode tries to attach a debugger it first checks if pkexec is installed as this gives a nicer popup asking for elevation of rights to attach to the process. However, since dev containers don't have a windowing system running pkexec isn't working as expected and thus prevents the debugger from attaching. Without pkexec in the container vscode 'falls back' to plain old sudo which we can run passwordless in the container. For pkexec to be removed we need to first purge software-propertied-common as well as autoremove all packages that were installed due to the installation of said package. By performing this all in one step we minimize the size of the layer we are creating.
During the creation of the devcontainer we need to add a ppa repository, which is easiest done via software-properies-common. As turns out this installes pkexec into the container as a side effect.
When vscode tries to attach a debugger it first checks if pkexec is installed as this gives a nicer popup asking for elevation of rights to attach to the process. However, since dev containers don't have a windowing system running pkexec isn't working as expected and thus prevents the debugger from attaching.
Without pkexec in the container vscode 'falls back' to plain old sudo which we can run passwordless in the container.
For pkexec to be removed we need to first purge software-propertied-common as well as autoremove all packages that were installed due to the installation of said package. By performing this all in one step we minimize the size of the layer we are creating.