Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Exposing volumes in dockerfile #259

Open
firstdorsal opened this issue Jan 27, 2022 · 0 comments
Open

Exposing volumes in dockerfile #259

firstdorsal opened this issue Jan 27, 2022 · 0 comments

Comments

@firstdorsal
Copy link

firstdorsal commented Jan 27, 2022

Volumes should not be exposed in a dockerfile as they cannot be removed downstream.
Using the volume directive in a dockerfile isn't good practice as they cannot be changed by a user of the image.

See: https://docs.docker.com/engine/reference/builder/#notes-about-specifying-volumes
Changing the volume from within the Dockerfile: If any build steps change the data within the volume after it has been declared, those changes will be discarded.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant