docker-compose

“Operation not permitted” from docker container logged as root

帅比萌擦擦* 提交于 2020-06-14 20:08:41
问题 I need your help to understand my problem. I updated my macintosh with Catalina last week, then i updated docker for mac. Since those updates, i have ownership issues on shared volumes. I can reproduce with a small example. I just create a small docker-compose which build a nginx container. I have a folder src with a PHP file like this "src/index.php". I build the container and start it. Then i go to /app/www/mysrc (shared volume) and tape "ls -la" to check if the index.php is OK and i get :

Expose docker port to internal network only

这一生的挚爱 提交于 2020-06-13 04:55:01
问题 Running numerous dockers right now on a new build for a homelab server and trying to make sure everything is locked down and secure. I use the server for a variety of things, both requiring access from the outside world (nextcloud) and things that I will only access from my internal network (plex). Of course the server is behind a router that limits open ports but looking for additional security - I would like to restrict those dockers that I want to only access via internal network, to 192

Expose docker port to internal network only

时光总嘲笑我的痴心妄想 提交于 2020-06-13 04:52:22
问题 Running numerous dockers right now on a new build for a homelab server and trying to make sure everything is locked down and secure. I use the server for a variety of things, both requiring access from the outside world (nextcloud) and things that I will only access from my internal network (plex). Of course the server is behind a router that limits open ports but looking for additional security - I would like to restrict those dockers that I want to only access via internal network, to 192

depends_on doesn't wait for another service in docker-compose 1.22.0

左心房为你撑大大i 提交于 2020-06-12 06:27:06
问题 My current docker-compose.yml - # This docker-compose file uses '.env' file present in the current directory, # for database credentials. If you want to change the credentials please # change the data in '.env'. # '.env' file might be hidden as dot files are hidden please unhide to see it. # Know more about '.env' file: https://docs.docker.com/compose/env-file/ version: '3' services: postgresdb: image: postgres:9.5 environment: POSTGRES_USER: ${ENV_POSTGRES_USER} POSTGRES_PASSWORD: ${ENV

docker-compose args from shell

随声附和 提交于 2020-06-11 02:59:46
问题 I want to build via the docker-compose an image that uses my private key for cloning private git repos. More or less the compose becomes as follows: myservice: build: context: . args: RSA: ~/.ssh/id_rsa The above does not work, neither the following: myservice: build: context: . args: RSA: $(cat ~/.ssh/id_rsa) The docker build command works just fine however in the form of docker build --build-args RSA=$(cat ~/.ssh/id_rsa) -t myservice:latest 回答1: You can use the same syntax with docker

com.mongodb.MongoSocketOpenException: Exception opening socket(MongoDB, Docker)

送分小仙女□ 提交于 2020-06-10 04:57:39
问题 I try to starting my application(Spring Boot + Spring Cloud + Eureka + MongoDB) with using docker image, but i can't get connection to MongoDB. Exception: exception "com.mongodb.MongoSocketOpenException: Exception opening socket." I starting my application with execute command: docker-compose up --build Docker log: application.yml: # Spring properties spring: application: name: car-service data: mongodb.host: localhost mongodb.port: 32769 mongodb.uri: mongodb://localhost/test mongo

“no space left on device” even after removing all containers

可紊 提交于 2020-06-10 03:31:23
问题 While experimenting with Docker and Docker Compose I suddenly ran into "no space left on device" errors. I've tried to remove everything using methods suggested in similar questions, but to no avail. Things I ran: $ docker-compose rm -v $ docker volume rm $(docker volume ls -qf dangling=true) $ docker rmi $(docker images | grep "^<none>" | awk "{print $3}") $ docker system prune $ docker container prune $ docker rm $(docker stop -t=1 $(docker ps -q)) $ docker rmi -f $(docker images -q) As far

Why does a container running a console app simply exits after starting

浪尽此生 提交于 2020-06-09 04:41:19
问题 I want to run a simple dotnet core console app in a container interactively. I am not able to do that and the container simply starts and then exits immediately without fully running the program. All that the console app has is the followng three statements. Console.WriteLine("Hello World!"); var readText = Console.ReadLine(); // Wait for me to enter some text Console.WriteLine(readText); The last two lines make it interactive. When I run the container, it prints the Hello World! But then it

Docker mac symfony 3 very slow

爷,独闯天下 提交于 2020-06-08 17:20:52
问题 I'm starting a new project with Symfony 3 and I want to use Docker for the development environment. We will work on this project with a dozen developers so I want to have an easy install process. Here's my docker-compose.yml version: '2' services: db: image: mysql ports: - "3307:3306" environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: mydb MYSQL_USER: root MYSQL_PASSWORD: root php: build: ./php-fpm expose: - "9001" volumes: - .:/var/www/project - ./var/logs:/var/www/project/app/logs links

docker compose environment variable for command

橙三吉。 提交于 2020-06-08 15:52:28
问题 I am having troubles in passing environment variables to my custom image via the compose command option: My compose file: --- version: '2' services: myservice: image: mycustomimage_lms environment: CONF_HOME: /opt/apps-java/ APP_ENV: dev UUID: me1 command: -Dconfig.home=${CONF_HOME} -Dcomponent.name=LMS -Denv=${APP_ENV} -Duser.dir=/tmp/ -DLMS_UUID=${UUID} -jar /opt/apps-java/my.jar ports: - "9060" volumes: - ./:/opt/apps-java/ - ./:/var/logs/apps-logs/ - ./:/tmp/data My image is just a custom