K
K
Kolya Vantukh2020-09-11 22:12:17
Docker
Kolya Vantukh, 2020-09-11 22:12:17

Do commands in a Dockerfile and commands executed in a container via 'docker exec [container_name] bash'' run in the same environment?

There is an image of Vesta niiknow/vestacpand I want to install several packages to it via apt-get. If packages are installed through Dockerfile, then some errors occur in the process, if the same packages are installed in the container of this image, then everything is installed without problems. Why is this happening? I know that the commands in Dockerfileare executed in the image, and the commands through docker execare already in the running container, but shouldn't the essence be the same? Those. if the image is based on niiknow/vestacpubuntu 16.04, then the commands run in these two ways should be run on ubuntu 16.04 and return the same results? Help me to understand

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-09-11
@q2digger

Shall we show the dockerfile?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question