-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEAT] Make the Dockerfile be able to support itself + fix various issues #4
Draft
itislu
wants to merge
24
commits into
LeaYeh:main
Choose a base branch
from
itislu:feat-self-contained-dockerfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+260
−214
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried to do the same thing manually for the normal Dockerfile (without devcontainer), but I just don't know enough about Docker. With devcontainers it's so easy because you can just use a "feature" and it will do everything for you.
Install oh-my-zsh before francinette ensures the `.zshrc` exists and the francinette installer will recognize that.
301a395
to
b057d01
Compare
itislu
added a commit
to itislu/42-CPP_Modules
that referenced
this pull request
Feb 8, 2025
Updates from LeaYeh/42-Docker-DevEnv#4
…ategory and alphabet
Also reorder declaration of `ARG`s to when they are actually needed to reduce rebuilds when env variables change.
b057d01
to
b2a8b4f
Compare
89741c0
to
1c0efe8
Compare
It looks like git overwrites the .gitconfig file when it changes something. This is not possible however because the file is mounted to the host file system, so it cannot be replaced, only the content can be changed. The fix is to mount it somewhere else (read-only) and then copy it to the desired place at container start. Because everything in the user's home directory is now a copy and not directly mounted anymore, this also has the side effect that the user can now freely experiment with the .gitconfig in the container. Also: - FIx syntax to mount read-only in docker-compose. False: `readonly` Correct: `ro`
1c0efe8
to
0715700
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Dockerfile can now be used on its own and does not rely on the devcontainer or docker-compose anymore.
The role of the devcontainer and docker-compose are to just make it easier to have some configuration in one place and to not have to remember the long docker commands.
Features
scan-build
.ncdu
.man
and manpages, also for MLX..env
file.All important environment variables, like
USERNAME
,UID
,GID
andWORKSPACE_FOLDER
can be configured this way.Improvements
make -j
).Changes
I can imagine users of this container might sometimes have broken zshrc files. I left a commented out line to load .zshrc from the local environment if the user really wants it.
/workspace/<project_directory>
.run-container
to42-docker-devenv
.Fixes
What's important is that the UID and GID match with the user who created the local repository.
francinette
alias for zsh.Style
Documentation