Docker

VSCode - XDebug connected to client but break points does not work

只愿长相守 提交于 2021-02-11 13:22:58
问题 I work on PHP application and I want to debug my website. I'm working on IDE VSCode on Windows 10. I use Docker to launch my website in WSL2. I have configured XDebug in my php-fpm:7.3 container. root@00376c075cd3:/var/www# php -version PHP 7.3.18 (cli) (built: May 15 2020 13:33:15) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans On VSCode, I have configured my launch

VSCode - XDebug connected to client but break points does not work

心不动则不痛 提交于 2021-02-11 13:22:50
问题 I work on PHP application and I want to debug my website. I'm working on IDE VSCode on Windows 10. I use Docker to launch my website in WSL2. I have configured XDebug in my php-fpm:7.3 container. root@00376c075cd3:/var/www# php -version PHP 7.3.18 (cli) (built: May 15 2020 13:33:15) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans On VSCode, I have configured my launch

Wait script overrides default CMD and exits Docker container

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 13:03:50
问题 Docker-compose.yaml: version: "3" services: mysql: image: mysql:5.7 environment: MYSQL_HOST: localhost MYSQL_DATABASE: mydb MYSQL_USER: mysql MYSQL_PASSWORD: 1234 MYSQL_ROOT_PASSWORD: root ports: - "3307:3306" expose: - 3307 volumes: - /var/lib/mysql - ./mysql/migrations:/docker-entrypoint-initdb.d restart: unless-stopped web: build: context: . dockerfile: web/Dockerfile volumes: - ./:/web ports: - "32768:3000" environment: NODE_ENV: development PORT: 3000 links: - mysql:mysql depends_on: -

Wait script overrides default CMD and exits Docker container

心不动则不痛 提交于 2021-02-11 13:02:05
问题 Docker-compose.yaml: version: "3" services: mysql: image: mysql:5.7 environment: MYSQL_HOST: localhost MYSQL_DATABASE: mydb MYSQL_USER: mysql MYSQL_PASSWORD: 1234 MYSQL_ROOT_PASSWORD: root ports: - "3307:3306" expose: - 3307 volumes: - /var/lib/mysql - ./mysql/migrations:/docker-entrypoint-initdb.d restart: unless-stopped web: build: context: . dockerfile: web/Dockerfile volumes: - ./:/web ports: - "32768:3000" environment: NODE_ENV: development PORT: 3000 links: - mysql:mysql depends_on: -

Redirecting output of nohup in docker not working

人盡茶涼 提交于 2021-02-11 12:57:46
问题 I have to run a flask application in docker. The application is started when I run start.sh (details below) which started the application using nohup command and redirects the output to a logfile. This is running fine in normal Linux system (without docker), but when I run this inside a docker container, the log file does not show any output. In the docker container, the log file is generated with size 0 and the log output is dumped in nohup.out file. I am not sure why the output is

Redirecting output of nohup in docker not working

旧巷老猫 提交于 2021-02-11 12:57:20
问题 I have to run a flask application in docker. The application is started when I run start.sh (details below) which started the application using nohup command and redirects the output to a logfile. This is running fine in normal Linux system (without docker), but when I run this inside a docker container, the log file does not show any output. In the docker container, the log file is generated with size 0 and the log output is dumped in nohup.out file. I am not sure why the output is

Docker rootless unable to pull images

老子叫甜甜 提交于 2021-02-11 12:50:33
问题 I am running docker rootless on a server, following https://docs.docker.com/engine/security/rootless/. With this I am able to pull and run hello-world. But whenever I want to pull a more complex image, I run into the following error: $ docker pull ubuntu Using default tag: latest latest: Pulling from library/ubuntu 83ee3a23efb7: Extracting [==================================================>] 28.57MB/28.57MB db98fc6f11f0: Download complete f611acd52c6c: Download complete failed to register

Docker rootless unable to pull images

妖精的绣舞 提交于 2021-02-11 12:50:22
问题 I am running docker rootless on a server, following https://docs.docker.com/engine/security/rootless/. With this I am able to pull and run hello-world. But whenever I want to pull a more complex image, I run into the following error: $ docker pull ubuntu Using default tag: latest latest: Pulling from library/ubuntu 83ee3a23efb7: Extracting [==================================================>] 28.57MB/28.57MB db98fc6f11f0: Download complete f611acd52c6c: Download complete failed to register

Correct IP address to access web application in apache docker container

时间秒杀一切 提交于 2021-02-11 12:48:58
问题 I have an easy apache docker setup defined in a docker-compose.yml : services: apache: image: php:7.4-apache command: /bin/bash -c "/var/www/html/startup.sh && exec 'apache2-foreground'" volumes: - ./:/var/www/html - /c/Windows/System32/drivers/etc/hosts:/tmp/hostsfile ports: - "80:80" From the startup.sh script I want to modify the hosts file from the host OS through the volume. Here I want to dynamically add an entry to resolve the hostname test.local to the ip address of the docker web

Azure Container Instances - from where to execute “docker login” before we execute “az container create” command

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 12:40:25
问题 we need to deploy ACI - Azure Container Instance in private virtual network. We followed the example and prepared YAML file from this link. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet So now we need to execute before that our command: az container create --resource-group myResourceGroup --file vnet-deploy-aci.yaml in that yaml we are referencing our image, similarly like from the above example (just we are using our private repo ) image: mcr.microsoft