docker-compose

Kill Docker container permission denied

天大地大妈咪最大 提交于 2021-02-11 13:27:46
问题 I'm new to Docker and here what I'm trying to do is delete docker container using docker kill command. I'll show below what I have done so far, Step1: docker run --rm -ti ubuntu sleep 3000 Step2: docker ps Step3: docker kill frosty_bose Error response from daemon: Cannot kill container: quizzical_taussig: Cannot kill container c6379597647089b3e9b251f921ec443d987b0c1b76dfc6d06c704655ecdede8e: unknown error after kill: runc did not terminate sucessfully: container_linux.go:388: signaling init

Google Api Client - AttributeError: 'str' object has no attribute 'authorize'

﹥>﹥吖頭↗ 提交于 2021-02-11 13:05:36
问题 My code was working up until I decided to move my Google Api credentials into my Docker env. I'm using Flask as a web server framework. This is my set up: DOCKER: docker-compose-dev.yml environment: - FLASK_ENV=development - APP_SETTINGS=project.config.DevelopmentConfig - GOOGLE_APPLICATION_CREDENTIALS=/usr/src/app/project/api/resources/youtube/urls/project-84a0ef4dcd33.json FLASK: config.py class DevelopmentConfig(BaseConfig): CREDENTIALS = os.environ.get('GOOGLE_APPLICATION_CREDENTIALS')

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: -

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

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

一曲冷凌霜 提交于 2021-02-11 12:39:39
问题 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

How to connect to other container from Dockerfile while docker-compose build

余生长醉 提交于 2021-02-11 12:29:26
问题 I try to configure docker compose for my php project. On deploy I want to update a source code, update composer dependencies and run database migrations. So I have a docker-compose.yml file: version: '3.0' services: php: build: context: . dockerfile: php/Dockerfile depends_on: - postgres postgres: image: "postgres:13-alpine" restart: always environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB_NAME} Php container builds from the next

docker-compose mongo unable to authenticate after initialising with custom admin password

China☆狼群 提交于 2021-02-11 12:27:36
问题 This is my docker-compose file docker-compose.yml version: "3.1" services: mongo1: container_name: mongo1 image: mongo restart: always environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS} MONGO_INITDB_DATABASE: ${MONGO_DB_NAME} ports: - 27017:27017 - 28017:28017 env_file: - .env volumes: - volume-mongo:/data/db - ./mongo/init-mongo-js.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro command: ['--auth', '--wiredTigerCacheSizeGB=1'] networks: - mongo

TimeoutError: [Errno 110] Connect call failed when trying to connect to redis service in docker

醉酒当歌 提交于 2021-02-11 12:26:04
问题 I'm dockerizing a web application that uses Django Channels for websocket functionality. It depends on redis. I'm having trouble getting the redis portion of the application to work correctly. I've tried to stick to this redis/compose guide. docker-compose.yml version: "3" services: db: image: mysql:latest volumes: - "./.mysql-data/db:/var/lib/mysql" restart: always ports: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: rootpassword MYSQL_DATABASE: database MYSQL_USER: user MYSQL_PASSWORD: