Open jurgonaut opened 4 years ago
Is it your complete Dockerfile @jurgonaut ? Is it just one RUN instruction (and FROM)? This looks like a custom base image... Do you have another image with your application code where you use this custom base image?
Yes this is all. There is also a COPY which copies a simple python script to test if all the packages are installed. The python script only has a few imports. The base image is an official AWS image. What do you suggest, will it work with another base image?
@jurgonaut is that COPY instruction in the same Dockerfile? Do you set the ENTRYPOINT and/or CMD instructions? What do they look like if you do? If not, how do you invoke your simple python script in the container?
@kcq This is the rest of the Dockerfile
ADD ./entry.sh /usr/local/bin/entry.sh
ADD ./test.py /usr/local/bin/test.py
RUN ["chmod", "+x", "/usr/local/bin/entry.sh"]
RUN ["chmod", "+x", "/usr/local/bin/test.py"]
WORKDIR /usr/local/bin
ENTRYPOINT ["/bin/bash", "/usr/local/bin/entry.sh"]
The file entry.sh content is:
python3.7 ./test.py
And test.py content is:
import MySQLdb
print("SUCCESS")
@jurgonaut did you find a solution ? I have the exact same problem
@michaelcukier No I didn't. I haven't work on this since 2020 so I don't know of any recent developments.
I'm trying to minimize a docker container that uses python and I am getting an error. My Dockerfile looks like this:
When I run the container I get the error:
The command I am using for building the slim container is:
Is there a flag I am missing or something similar? I am new to this project so I am not sure if this issue related to docker-slim. But I would be really happy I could get some help because the results amazing.