V
V
Vadim2021-07-14 17:27:32
Docker
Vadim, 2021-07-14 17:27:32

How to save work results from a Docker container to a host folder?

Hello everyone,

I'm running a container with auto-delete - the command docker run --rm node:13-alpine ... running in the container
npm install
npm ci
npm run test:ci

I want to save the results of the container, say from the container folder ./test to a local folder on the /tmp/test/ host,

you can probably do two options - add code after npm run test:ci - in the container itself or add commands after npm run --rm node:13-alpine

Good luck to everyone,
Vadim

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2021-07-14
@Viji

You can mount a directory from the host machine
-v host-data-dir:/data:rw

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question