ubuntu - Docker: Is it necessary to mount a new partition -


i want install product on docker. installed on ec2-server of amazon.

the installation starts creating mount point /product. partition disk fdisk , they're creating new partition. after create filesystem , mount new partition /product.

i'm not familiar seems me main goal install product on 1 new disk.

the installation performed on ubuntu:14.04 want start this:

docker run -i -t ubuntu:14.04 /bin/bash 

performing same installation instructions , create image of container.

is necessary perform of mount instructions or can start installation?

perform of mount instructions

not exactly.
best practice define installation step in dockerfile, starting from ubuntu:14.04, , including volume /mount in order declare /mount volume.

this preferred docker run + (work) + (exit) + docker commit, because dockerfile, can repeat installation process simple docker build. , keep specification of installation written in dockerfile.

the alternative go way, , try extract dockerfile resulting image.

in case, docker commit allows apply dockerfile instruction image created.
typically, mount done @ time:

docker commit -c='volume /mount'` <yourcontainer> <yourimage>` 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -