Turn Your Vehicle Into a Smart Earning Asset

While youโ€™re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

๐Ÿš— You set the rental price
๐Ÿ” Secure bookings with verified renters
๐Ÿ“ Track your vehicle with GPS integration
๐Ÿ’ฐ Start earning within 48 hours

Join as a Partner Today

Itโ€™s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

docker-compose prepends current directory name to named volumes

docker-compose

docker-compose

Issues – docker-compose prepends current directory name to named volumes

What actually happens is that the named volume gets prepended with (a simplified version of) the directory name from which the docker-compose command was run.

For instance, if I run from the “dcompos-programs” directory, and I name the volume “my_named_vol”, then I end up with a volume named “dcompos-programs_my_named_vol”.

docker-compose-named-volume.yml:

[text]

version: ‘3’
services:

solr:
image: alpine:3.5
container_name: foo
volumes:
– my_named_vol:/opt/foo
volumes:
my_named_vol:

[/text]

Result:

[text]

$ docker-compose -f docker-compose-named-volume.yml up -d && \
> echo “## named volume:” && \
> docker volume ls | grep my_named_vol && \
> echo “## stop” && \
> docker-compose -f docker-compose-named-volume.yml down && \
> echo “## rm volume” && \
> docker volume rm $(docker volume ls | grep my_named_vol | awk ‘{print $2}’)
Creating network “deploymentroot_default” with the default driver
Creating volume “dcompos-programs_my_named_vol” with default driver
Creating foo

[/text]

Answer
docker-compose uses a project name. By default itโ€™s the directory name which prevents collisions with existing containers. But you can use -p to change the prefix name.

Docker Tutorials Fundamental To Advanced-2021 Crash Course:- https://bit.ly/3hOIbTB

You can use the external volume setting to avoid the prefix.
https://docs.docker.com/compose/compose-file/#external

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.