LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 06-24-2023, 03:32 PM   #1
Buttersack
LQ Newbie
 
Registered: Oct 2018
Posts: 2

Rep: Reputation: Disabled
Problem using docker-compose and volumes


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>
 
Old 06-25-2023, 05:32 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,239

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Did you set "external: true" on the volume?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Deprecated Linux commands, Podman Compose vs. Docker Compose, and more sysadmin tips LXer Syndicated Linux News 0 07-05-2022 08:14 AM
LXer: Podman Compose or Docker Compose: Which should you use in Podman? LXer Syndicated Linux News 0 06-18-2022 04:48 PM
LXer: Setup Ruby on Rails Development environment with Docker and Docker Compose on Ubuntu LXer Syndicated Linux News 0 05-22-2019 10:42 PM
LXer: Docker Engine 1.6 Debuts Alongside Docker Registry 2.0 and Compose 1.2.0 LXer Syndicated Linux News 0 04-17-2015 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration