G
G
Grishalovesfront2021-05-27 18:50:15
Docker
Grishalovesfront, 2021-05-27 18:50:15

Is it possible to copy a docker image file?

Good day! I’m just starting to learn Docker, the question is quite simple, but I can’t find an answer in any way, can I run a build in the Dockerfile (the webpack will collect all my scripts into one) and then copy this created file to another place?

Something like:

WORKDIR /app
COPY . .
RUN npm run build (creates this file test.js which needs to be copied later)
COPY /app/public/test.js /usr/local/bin

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-27
@yarkov

Can. Or you can immediately set the desired directory in WORKDIR and not copy anything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question