-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ci: make easier the debugging of the docker-alpine-musl-gcc
job
#23399
Merged
spytheman
merged 2 commits into
vlang:master
from
spytheman:ci_ease_debugging_of_docker_jobs
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
####################################################################################### | ||
## The goal of this file, is to provide an easy and reproducible way to check *locally* | ||
## the CI job `docker-alpine-musl-gcc` | ||
## Building the docker image: | ||
## docker build -t ci_alpine_local - < .github/workflows/Dockerfile.ci_alpine_local | ||
## Running the docker image, after building it: | ||
## docker run --rm -it -v .:/opt/vlang -w /opt/vlang ci_alpine_local | ||
## Once it is running, inside the container you can: | ||
## make && v -e 'println(2+2)' | ||
## ... then do whatever you need to reproduce the CI test failure. | ||
## Note: after you are finished, and exit the container, run `make` again, otherwise | ||
## you will be using V (and potentially V tools) that were compiled with musl. | ||
####################################################################################### | ||
FROM thevlang/vlang:alpine-build | ||
|
||
LABEL maintainer="spytheman <[email protected]>" | ||
|
||
WORKDIR /opt/vlang | ||
|
||
ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
|
||
## install development packages | ||
RUN apk --no-cache add \ | ||
musl-dev libc-dev libc6-compat gcompat \ | ||
libunwind-dev libunwind-static \ | ||
gc gc-dev \ | ||
binutils diffutils elfutils \ | ||
strace gdb \ | ||
pcre bash fzf fzf-vim tmux less file colordiff \ | ||
vim vim-editorconfig \ | ||
nano nano-syntax \ | ||
micro | ||
|
||
RUN git config --global --add safe.directory /opt/vlang &&\ | ||
git config --global --add safe.directory /opt/vlang/vc &&\ | ||
git config --global --add safe.directory /opt/vlang/thirdparty/tcc &&\ | ||
find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc &&\ | ||
micro -plugin install detectindent &&\ | ||
micro -plugin install editorconfig &&\ | ||
micro -plugin install monokai-dark &&\ | ||
micro -plugin install quickfix &&\ | ||
micro -plugin install runit &&\ | ||
micro -plugin install cheat &&\ | ||
micro -plugin install jump &&\ | ||
true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this accomplish? I would finish with |
||
|
||
## setup runtime environment for v and bash: | ||
ENV VTMP /tmp/v | ||
ENV VMODULES /tmp/vmodules | ||
ENV VFLAGS "-d dynamic_boehm" | ||
|
||
CMD ["bash"] |
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
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
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
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
Oops, something went wrong.
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.
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.