问题
How can I copy a file from a path within the container to a different path within that same container in a Dockerfile during the docker-compose build process?
COPY <src> <dest>
This copies a file from the host outside the container. I don't know how to have <src>
specify a file inside the container to copy.
回答1:
as @tkausl and @JohnKugelman pointed out files can be copied by the following command syntax:
RUN cp <src-path-within-the-container> <dest-path-within-the-container>
来源:https://stackoverflow.com/questions/63058057/copy-files-within-the-container-in-dockerfile