Comments (5)
My solution is to define environment variable "COMPOSEDIR" on compuse ui docker-compose.yml as follows:
version: '2'
services:
composeui:
image: francescou/docker-compose-ui
container_name: composeui
environment:
- GIT_REPO=https://github.com/francescou/docker-compose-ui.git
- COMPOSEROOT=/home/user/git/docker.shell
ports:
- 5000:5000
volumes:
- ..:/opt/docker-compose-projects
- /var/run/docker.sock:/var/run/docker.sock
The volume relative to the directory defined in "COMPOSEROOT" can then be referenced in the docker-compose.yml of other service (e.g. ovs) as follows:
version: '2'
services:
ovs:
image: socketplane/openvswitch
container_name: ovs
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- /lib/modules:/lib/modules
- ${COMPOSEROOT}/ovs:/root
network_mode: host
I also tried to replace the variable name "COMPOSEROOT" with "PWD". It seems fine. For your info.
from docker-compose-ui.
Hi,
I managed to reproduce the issue. The problem occurs when you mount a volume by its relative path, if you write the full path of the folder it works, e.g. /opt/docker-compose-projects/my-awesome-project/scripts/
.
However, I will make further investigation to fix the application to support relative paths.
from docker-compose-ui.
For now I moved the server out of docker to fix the issue as I have delivery of a project dependent on this. There are some caveats that needs to be worked out.
if we map a folder like ../scripts
then it would point to your /opt/scripts
, now if I map the folder while running docker-compose-ui
, then on first time the mapping won't work. But if I restart the container using docker client it works. So some different type of use cases needed to checked out around this area
from docker-compose-ui.
I've made several tests, I came to the conclusion that the problem is caused by Compose itself while running inside a container.
I've tried to mount a volume with docker-compose inside a container based on the official centos image and then another one based on dduportal/docker-compose. In both cases I didn't manage to mount a volume.
I've also found some information about the problem on the following links: dduportal/docker-compose/#volumes-relative-and-absolute (check also the workaround suggested by kayvan in the comments) and https://github.com/dduportal/dockerfiles/issues/5
I will close the issue, feel free to reopen if necessary.
from docker-compose-ui.
Hi Tommy, it seems a good solution
thanks for your contribution
from docker-compose-ui.
Related Issues (20)
- How to access private Git repo? HOT 2
- Multiple Docker Engines HOT 1
- Question - Is this project right for me? HOT 2
- Problem with same name of parent directory HOT 1
- Add support for .yaml HOT 3
- Doesn't work on Red Hat Enterprise Linux Server 7.4 HOT 2
- Services: no containers found HOT 3
- [Enhancement] Edit docker-compose file for existing services HOT 7
- State of project not recognised if a folder has a hypenated name
- Very useful tool HOT 1
- docker-compose 3.7 HOT 2
- Bring specific container down that was started with scale
- Display service version
- Nested docker-compose.yml
- permissions security vulnerability HOT 1
- Project website URL on GitHub project doesn't work HOT 4
- HTTPS support?
- Support for armv7l
- Is the docker-compose-ui project dead? HOT 2
- python 3.9 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-compose-ui.