-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
some information about installing megalinter in custom Dockerfile #3455
Comments
Hi @magowiz the "MegaLinter program" kind of is the MegaLinter image, it's not possible to run without it :/ All MegaLinter descriptors contain the installation instructions to build the Dockerfile, and those instructions are specific to alpinelinux (examples: use of apk , reuse of alpine based docker images of linters ... ) So unfortunately I don't see a way to create debian-based ML image without major updates in MegaLinter:
With the 100+ linters, such task seems huge :/ |
I think he was referring to the python logic, that we install in each image. If it were an installable Python package, he would be able to do his images |
Oh I see MegaLinter is not published on a package manager, but its "core" code is corresponding to the following lines So you might do something like getting source files on MegaLinter repo then run the lines in your debian image to have MegaLinter python core + descriptors + default config in it COPY megalinter /megalinter
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
&& rm -rf /var/cache/apk/* \
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
#######################################
# Copy scripts and rules to container #
#######################################
COPY megalinter/descriptors /megalinter-descriptors
COPY TEMPLATES /action/lib/.automation |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
Hi,
I would like to build my own docker image with mega-linter inside, the main reason for this is that I use have mainly python projects and installing dependencies before scanning it takes longer on alpine based images, so I wanted to create a debian-based mega-linter flavor python.
I saw your repository docker files and they are complex, I would like to know if there is an installable package for at least megalinter program, without linters (I can install them separately and only those I want), if something like
pip install megalinter
orapt-get install megalinter
or againnpm i megalinter
can be performed.I saw the mega-linter-runner package but this, for what I understand, creates configuration locally and download standard images.
Please let me know.
Best regards,
magowiz
The text was updated successfully, but these errors were encountered: