Article 6CES2 Problem using docker-compose and volumes

Problem using docker-compose and volumes

by
Buttersack
from LinuxQuestions.org on (#6CES2)
Hello,

i'm fairly new to Docker and run into troubles where i can't get myself out.

I'd like to create an image from scratch (already have a working Dockerfile). The build get's one parameter, the version of the software i would like to install inside the image. The version is also used as tag for the resulting image.

The configuration should be kept outside of the container in a separate volume. I'd like to prepopulate the volumes contents (files) and then mount it to the container.

I've used "docker volume create ..." for this but the container build by my docker-compose.yaml file seems to always create an own volume, instead of using my pre-created one. The docker-compose volume is named <name of compose script>_<name of my precreated volume>
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments