Reputation: 100370
Right now I have this in a Dockerfile:
ENV NLTK_DATA /nltk_data
RUN python3 -m nltk.downloader -d /nltk_data all
this Python library has several gigs of data. I don't know need an extra 5 GBs in each Docker image I publish to Amazon ECR. Is there some way to push a shared image to ECR that containers can reference when they run?
I want to do something like:
docker pull ecr-url/shared-image:latest
docker run -v shared-image:/nltk_data:/nltk_data my-image
basically, I don't see why it would be necessary to run the shared-image as a container, I just need the data from it. However, according to this answer: https://stackoverflow.com/a/34093828/1223975
it says:
Unfortunately there doesn't seem to be a way to copy files directly from Docker images. You need to create a container first and then copy the file from the container.
Upvotes: 2
Views: 921