docker-compose

How to run docker-compose inside docker in docker which runs inside gitlab-runner container?

泄露秘密 提交于 2020-08-27 06:04:29
问题 I have a gitlab runner inside a docker container, runs fine if I run an image like nginx. But now I tried to run docker in docker (dind) inside the gitlab runner and I want to run docker-compose inside the dind. Docker info runs fine, but if I try to run docker-compose I get an permission-denied error. I linked the /usr/local/bin/docker-compose file to the gitlab runner container and enter it in the volumes parameter in the runner config.toml file. If I try to run sudo it ends with an unknown

Docker - Reuse docker-compose configurations for different projects

不羁岁月 提交于 2020-08-26 10:25:10
问题 I have a large Docker project with Dockerfiles for nginx, apache2, varnish, redis configured and working well after weeks of changes and testing. I am now at a point where I setup the projects to use docker-compose and override.yml files for easy setup: I am trying to use the same docker-compose setup for multiple projects (websites) Normal startup (using docker-compose.yml and optional docker-compose.override.yml ) docker-compose up -d Custom startup (using specific docker-compose files)

Docker: Build context and working with .NET projects and submodules in Git causes a big problem

我的梦境 提交于 2020-08-26 07:14:38
问题 The build context for Docker is important, since not having the context set to a location in the path "high up" will normally give you the dreaded Forbidden path outside the build context problem. This discussion, regarding .NET project with Project References, led me to the conclusion that the Docker tools in Visual Studio places the Dockerfile incorrectly in the project folder, when it seems it needs to be in the folder where the solution file exists. This is so that the build context is

Docker: I can't map ports other than 80 to my WordPress container

孤者浪人 提交于 2020-08-24 02:06:07
问题 I want to map some random port on my computer e.g. localhost:7006 to my WordPress docker container's port 80 .When I change the port of WordPress from 80:80 to 7006:80 it's not only stops working on localhost(port 80) but also don't respond on localhost:7006 . docker-compose.yml file looks like this: version: '3' services: wordpress: depends_on: - db image: wordpress:4.7.1 restart: always volumes: - ./wp-content:/var/www/html/wp-content environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB

How to put seed data into SQL Server docker image?

久未见 提交于 2020-08-23 04:23:40
问题 I have a project using ASP.NET Core and SQL Server. I am trying to put everything in docker containers. For my app I need to have some initial data in the database. I am able to use docker sql server image from microsoft (microsoft/mssql-server-linux), but it is (obviously) empty. Here is my docker-compose.yml: version: "3" services: web: build: .\MyProject ports: - "80:80" depends_on: - db db: image: "microsoft/mssql-server-linux" environment: SA_PASSWORD: "your_password1!" ACCEPT_EULA: "Y"