docker-compose

docker compose build single container

拈花ヽ惹草 提交于 2020-07-04 05:52:14
问题 Using Compose, if I run docker-compose build , it will rebuild all the containers : > docker-compose build Building elasticsearch Step 1 : FROM elasticsearch:2.1 ---> a05cc7ed3f32 Step 2 : RUN /usr/share/elasticsearch/bin/plugin install analysis-phonetic ---> Using cache ---> ec07bbdb8a18 Successfully built ec07bbdb8a18 Building search Step 1 : FROM php:5.5.28-fpm ---> fcd24d1058c0 ... Even when rebuilding using cache, this takes time. So my question is: Is there a way to rebuild only one

docker compose build single container

泄露秘密 提交于 2020-07-04 05:52:08
问题 Using Compose, if I run docker-compose build , it will rebuild all the containers : > docker-compose build Building elasticsearch Step 1 : FROM elasticsearch:2.1 ---> a05cc7ed3f32 Step 2 : RUN /usr/share/elasticsearch/bin/plugin install analysis-phonetic ---> Using cache ---> ec07bbdb8a18 Successfully built ec07bbdb8a18 Building search Step 1 : FROM php:5.5.28-fpm ---> fcd24d1058c0 ... Even when rebuilding using cache, this takes time. So my question is: Is there a way to rebuild only one

How to create separate volumes for each container in docker compose

女生的网名这么多〃 提交于 2020-07-04 00:13:55
问题 I have created a docker image for which I want to run multiple containers. This docker image is dependent on few things which will remain same for all the containers but the only difference will be configuration of the containers. version: '2.4' services: s1: image: testdockerimg:latest volumes: - /home/andrew/Documents/CVAI/configs/s1config.json:/home/andrew/Documents/CVAI/configs/config.json - /home/andrew/Documents/CVAI:/home/andrew/Documents/CVAI/ restart: always mem_limit: 2g s2: image:

How do I prevent root access to my docker container

喜你入骨 提交于 2020-07-03 04:44:48
问题 I am working on hardening our docker images, which I already have a bit of a weak understanding of. With that being said, the current step I am on is preventing the user from running the container as root. To me, that says "when a user runs 'docker exec -it my-container bash', he shall be an unprivileged user" (correct me if I'm wrong). When I start up my container via docker-compose, the start script that is run needs to be as root since it deals with importing certs and mounted files

Error running docker container: starting container process caused “exec: \”python\“: executable file not found in $PATH”: unknown

╄→гoц情女王★ 提交于 2020-07-02 18:30:26
问题 I am trying to dockerize a simple Python-Flask application but I am getting an error while running my container. docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown. Workdir on localhost: /home/ubuntu/flask_web - app.py - Dockerfile - requirements.txt app.py #flask_web/app.py from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return

Postgresql Container is not running in docker-compose file - Why is this?

别来无恙 提交于 2020-06-29 05:34:07
问题 I am trying to figure out why I am getting an error about postgresql not running in my project. It is not connecting through Flask, nor when I try to access it through bash using the command docker-compose run postgres bash then psql returns the error: bash-5.0# psql psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? I tried running --force-recreate and to drop all

Node.js + Puppeteer on Docker, No usable sandbox

为君一笑 提交于 2020-06-29 03:54:10
问题 i'm building a node.js LTS application. I followed puppeteer documentation, so my Dockerfile has this content: FROM node:12.18.0 WORKDIR /home/node/app ADD package*.json ./ # Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) # Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer # installs, work. RUN apt-get update \ && apt-get install -y wget gnupg \ && wget -q -O - https:/

Running PHPUnit in Intellij with docker remote interpreter from docker-compose expects project in “/opt/project”

北慕城南 提交于 2020-06-28 04:20:13
问题 I have a PHP symfony project loaded in IntelliJ (2019.3.2, Build #IU-193.6015.39) with the following structure (left out irrelevant files like README, etc): <project_root> +- src/ +- tests/ +- vendor/ | +- autoload.php +- .env +- composer.json +- composer.lock +- docker-compose.yml +- Dockerfile +- phpunit.xml +- phpunit-custom.xml The project interpreter is set to use remote docker (Docker for Mac) by docker-compose and IntelliJ detects the interpreter and debugger correctly: docker-compose

docker-compose suppress mongodb output

冷暖自知 提交于 2020-06-27 16:44:10
问题 This isn't a breaking issue for me, but I have about four images stitched together in a service, postgres, redis, mongodb, and my application which is a python-flask application. What I want to do is disable the console output mainly for the mongodb image because it has a lot of output, so that I can see all the output from my flask unit tests without scrolling up and visually sorting through the mongodb stuff that I don't need to see after running docker-compose up. My docker compose yaml

How to fix error “Error: Database is uninitialized and superuser password is not specified.”

谁说我不能喝 提交于 2020-06-27 08:31:30
问题 Hello i get this error after i run docker-compose build up But i get this error postgres_1 | Error: Database is uninitialized and superuser password is not specified. Here is a snap shot of the error! And down below is my docker-compose.yml file version: '3.6' Server.js file services: smart-brain-api: container_name: backend build: ./ command: npm start working_dir: /usr/src/smart-brain-api ports: - "3000:3000" volumes: - ./:/usr/src/smart-brain-api #PostGres Database postgres: image: