Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

stop creating anonymous volumes during image build #5444

Merged
merged 3 commits into from
Aug 28, 2018

Conversation

tmclane
Copy link
Contributor

@tmclane tmclane commented Aug 27, 2018

Best practices dictate that you do not define VOLUMEs in the DockerFile.

Instead the volume should be defined in the docker-compose.yml file such that you can name them so they are not 'lost' and can be identified later and managed.
Creating them during the build means they are only used during the image creation process and then are never utilized again. This is a wasted effort plus a waste of disk space.

@heifner heifner requested a review from ericiles August 27, 2018 14:36
Copy link
Contributor

@ericiles ericiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tmclane,

Thanks for the PR! These changes break the Docker/nodeosd.sh script, as it was written with the expectation that the /opt/eosio/bin/data-dir directory exists. A simple solution is to add the following directly below the cd command at the top of Docker/nodeosd.sh:

if [ ! -d "/opt/eosio/bin/data-dir" ]; then
    mkdir /opt/eosio/bin/data-dir
fi

If you can update your PR with this change, I can then approve this PR and get it merged in.

@tmclane
Copy link
Contributor Author

tmclane commented Aug 28, 2018

@ericiles done. I didn't run into that problem because in my docker-compose.yml file I had mounted a volume at that location so it existed.

@heifner heifner merged commit 05d5aee into EOSIO:develop Aug 28, 2018
@tmclane tmclane deleted the bugfix/anonymous-volume branch August 28, 2018 22:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants