compile in docker multistage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, python
- Domain
- build-system, devops
Research direction
Review the multistage Docker build, especially the python setup.py install step and the final COPY commands for the Python package and libyara. Reproduce the final image and compare its Python installation and import path with the builder stage. Done means the reduced image can run import yara successfully.
Written by the indexing model from the issue text.
Description
Hello,
would like to know what are the right lib to copy after compiled yara && yara-python from sources.
FROM base-builder as yara-builder
RUN cd /tmp/ \
&& git clone --recursive https://github.com/VirusTotal/yara.git \
..
..
&& make install \
..
&& git clone --recursive https://github.com/VirusTotal/yara-python \
..
...
&& python setup.py install \
at the end :
COPY --from=yara-builder /usr/local/lib/python3.8/site-packages/yara_python-4.1.0-py3.8-linux-x86_64.egg /usr/local/lib/python3.8/site-packages/yara_python-4.1.0-py3.8-linux-x86_64.egg
COPY --from=yara-builder /usr/local/lib/libyara* /usr/local/lib/
but if I try in python to import yara I get ModuleNotFoundError: No module named 'yara'
(Instead if I try inside docker image to follow same step I used to compile, it works with any issue)
There is any other library/file to copy from compiler stage to the final stage?
Thanks
- Dominant language
- C
- Stars
- 754
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from VirusTotal/yara-python
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
VirusTotal/yara-python#263 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 28/100
VirusTotal/yara-python#234 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
VirusTotal/yara-python#218 · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
VirusTotal/yara-python#216 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
VirusTotal/yara-python#212 · 11 comments ·
All issues in VirusTotal/yara-python
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·