docker-compose

Docker-Compose mount volume overwrites host files

左心房为你撑大大i 提交于 2020-12-13 04:27:10
问题 I am mounting a directory from a CMS with content files inside a docker container. The mounting works absolutely. The CMS got some basic files, which are copied into the mounted folder in the container during build. Then it will be mounted to a directory on the host. Now the files from the Container are also on the host. I can change them and they will be kept in sync. If i restart my container docker-compose stop && docker-compose up -d the files on the host will be overwritten by the

Kafdrop - Cannot connect to Kafka Cluster setup using bitnami/kafka [duplicate]

半城伤御伤魂 提交于 2020-12-13 04:15:25
问题 This question already has answers here : Connect to Kafka running in Docker (3 answers) Closed 4 months ago . I setup a kafka cluster using bitnami kafka and zookeeper and I wanted to view this cluster or at least one broker using kafdrop. I used docker compose to build all the components. I initially followed this tutorial and then added the kafdrop config in the docker-compose.yml version: '2' networks: kafka-net: driver: bridge services: zookeeper-server: image: 'bitnami/zookeeper:latest'

can `bootBuildImage` create writeable volumes?

前提是你 提交于 2020-12-13 03:08:08
问题 Given a spring boot app that writes files to /var/lib/app/files . I create an docker image with the gradle task: ./gradlew bootBuildImage --imageName=app:latest Then, I want to use it in docker-compose : version: '3.5' services: app: image: app:latest volumes: - app-storage:/var/lib/app/files // ...ports etc volumes: app-storage: This will fail, because the folder is created during docker-compose up and is owned by root and the app, hence, has no write access to the folder. The quick fix is

no viable alternative at input 'CREATE TABLE

和自甴很熟 提交于 2020-12-13 02:59:51
问题 I can't add a MySQL connector with the command: curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{ "name": "useraccount-connector", "config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "mysql", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "1234", "database.server.name": "mylocaldb", "database.whitelist":

Secrets in docker compose

烂漫一生 提交于 2020-12-12 11:15:39
问题 My environment is an ubuntu 18.04 VPS. I can't get file-based secrets to work with mariadb in a docker container. create docker-compose.yml : version: '3.7' services: db: image: mariadb:10.4.8-bionic environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/password_root - MYSQL_PASSWORD_FILE=/run/secrets/password_user - MYSQL_DATABASE=database - MYSQL_USER=admin secrets: - password_root - password_user secrets: password_root: file: .secret_password_root password_user: file: .secret_password_user

Secrets in docker compose

北城以北 提交于 2020-12-12 11:14:26
问题 My environment is an ubuntu 18.04 VPS. I can't get file-based secrets to work with mariadb in a docker container. create docker-compose.yml : version: '3.7' services: db: image: mariadb:10.4.8-bionic environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/password_root - MYSQL_PASSWORD_FILE=/run/secrets/password_user - MYSQL_DATABASE=database - MYSQL_USER=admin secrets: - password_root - password_user secrets: password_root: file: .secret_password_root password_user: file: .secret_password_user

Secrets in docker compose

久未见 提交于 2020-12-12 11:14:10
问题 My environment is an ubuntu 18.04 VPS. I can't get file-based secrets to work with mariadb in a docker container. create docker-compose.yml : version: '3.7' services: db: image: mariadb:10.4.8-bionic environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/password_root - MYSQL_PASSWORD_FILE=/run/secrets/password_user - MYSQL_DATABASE=database - MYSQL_USER=admin secrets: - password_root - password_user secrets: password_root: file: .secret_password_root password_user: file: .secret_password_user

How to Initialize a Collection in Dockerized Mongo DB

こ雲淡風輕ζ 提交于 2020-12-10 07:46:12
问题 Here below is the docker-compose.yml I use to dockerize my MongoDB instance: version: '3.3' services: mongo: image: 'mongo:latest' ports: - '27017:27017' volumes: - 'data-storage:/data/db' networks: mynet: volumes: data-storage: networks: mynet: The container is created correctly and it starts without any problem. Is it possible to create a Mongo collection and populate it with some documents the first time the container starts? For instance, I'd like to run a few statements like these: db

How to Initialize a Collection in Dockerized Mongo DB

余生长醉 提交于 2020-12-10 07:44:21
问题 Here below is the docker-compose.yml I use to dockerize my MongoDB instance: version: '3.3' services: mongo: image: 'mongo:latest' ports: - '27017:27017' volumes: - 'data-storage:/data/db' networks: mynet: volumes: data-storage: networks: mynet: The container is created correctly and it starts without any problem. Is it possible to create a Mongo collection and populate it with some documents the first time the container starts? For instance, I'd like to run a few statements like these: db

How to Initialize a Collection in Dockerized Mongo DB

余生长醉 提交于 2020-12-10 07:44:00
问题 Here below is the docker-compose.yml I use to dockerize my MongoDB instance: version: '3.3' services: mongo: image: 'mongo:latest' ports: - '27017:27017' volumes: - 'data-storage:/data/db' networks: mynet: volumes: data-storage: networks: mynet: The container is created correctly and it starts without any problem. Is it possible to create a Mongo collection and populate it with some documents the first time the container starts? For instance, I'd like to run a few statements like these: db