docker-compose

webpack-dev-server proxy to docker container

末鹿安然 提交于 2019-12-05 22:49:39
问题 I have 2 docker containers managed with docker-compose and can't seem to properly use webpack to proxy some request to the backend api. docker-compose.yml : version: '2' services: web: build: context: ./frontend ports: - "80:8080" volumes: - ./frontend:/16AGR/frontend:rw links: - back:back back: build: context: ./backend expose: - "8080" ports: - "8081:8080" volumes: - ./backend:/16AGR/backend:rw the service web is a simple react application served by a webpack-dev-server. the service back is

Adding permissions to host directory with docker-compose

只谈情不闲聊 提交于 2019-12-05 22:45:12
问题 I'm trying to set up a development environment using docker-compose and my container does not seem to have permissions to the host directory that is mounted to the container, i'm getting this error when running a grunt task that tries to modify folders inside the volume: app_1 | Warning: Unable to delete ".tmp" file (EACCES, permission denied '.tmp'). Use --force to continue. here's my docker file: FROM node:0.10 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app RUN apt-get update \ && apt-get

CentOS8 安装docker

北城余情 提交于 2019-12-05 22:13:07
2019/11/28, CentOS 8, docker 19.03.5, docker-compose 1.25.0 摘要:CentOS8使用脚本安装docker,dnf安装rpm,安装docker-compose 安装docker 下载安装脚本 curl -fsSL https://get.docker.com -o get-docker.sh 运行安装脚本 sh get-docker.sh --mirror Aliyun 如果安装过程中,提示 package docker-ce-3:19.03.5-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed 是containerd.io版本过低,需要单独更新下containerd.io 在 官网 下载安装最新版containerd.io: sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm 安装完成后,重新运行脚本 sh get-docker.sh --mirror Aliyun 将当前用户加入docker组:

Docker Ignore is not woking well with docker compose and my file structure

馋奶兔 提交于 2019-12-05 22:01:35
I'am setting up a new dockerfile and docker-compose.yml. I'll below show first my file structure with rails and I want to use a new .dockerignore to ignore node_modules , .git . my docker version is: Docker version 18.09.0, build 4d60db4 my docker-compose.yml than I use is v3 Root Directory - Gemfile - app - bin - cable - db - config - lib - node_modules - public - vendor - docker - app - Dockerfile - .git - .gitignore - .dockerignore - docker-compose.yml docker/app/Dockerfile FROM ruby:2.3.1 ARG RAILS_ROOT RUN mkdir -p $RAILS_ROOT WORKDIR $RAILS_ROOT COPY . . docker-compose.yml version: '3'

Need to convert this relatively simple docker pull and run commands into a docker-compose.yml file?

不羁岁月 提交于 2019-12-05 21:50:32
I have three commands that I am using to "update","re-run", and then "clean up" my current docker image via our CI tool of choice (Jenkins). I'm not including my "container stop and remove" commands for simplicity's sake. docker pull my.private.registry:443/my-awesome-app docker run -d --env-file ./env.list -i -p 8080:8080 -p 9990:9990 my.private.registry:443/my-awesome-app docker rmi $(docker images -f "dangling=true" -q) I'm new to docker-compose and I understand that most of these pull/run steps could probably be done within a docker-compose.yml file. I'm hoping someone with experience in

Docker compose ignores my Dockerfile when I use the build command

↘锁芯ラ 提交于 2019-12-05 21:17:56
I have this folder structure: /home/me/composetest /home/me/composetest/mywildflyimage Inside composites I have this docker-compose.yml: web: image: test/mywildfly container_name: wildfly ports: - "8080:8080" - "9990:9990" Inside mywildflyimage I have this docker image: FROM jboss/wildfly EXPOSE 8080 9990 ADD standalone.xml /opt/jboss/wildfly/standalone/configuration/ RUN /opt/jboss/wildfly/bin/add-user.sh admin admin --silent CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"] If i run docker built -t test/mywildfly . docker-compose up Everything works

postgres and docker-compose : can't create a custom role and database

无人久伴 提交于 2019-12-05 21:15:29
问题 I'am trying to create a simple postgreSQL container with a custum user and database. This is my docker-compose file : version: '2' services: db.postgres: container_name: db.postgres image: postgres:10 environment: - POSTGRES_USER:'myuser' - POSTGRES_PASSWORD:'myuserpassword' - POSTGRES_DB:'mydb' ports: - '5432:5432' volumes: - ./pgdata:/var/lib/postgresql/data And the error when I try to connect to my database. docker exec -it db.postgres psql -U myuser myuserpassword psql: FATAL: role

/bin/sh: 1: ./configure: not found - dockerfile

我的梦境 提交于 2019-12-05 20:56:16
问题 I need to install Cosign filter for Apacher server. I need to use this cosign-filter from Confluence, but when my installation hits ./configure it trow as error: ERROR: Unknown instruction: --ENABLE-APACHE2=/PATH/TO/APACHE2/BIN/APXS Then i found out this installation for cosign filter with github repository, and because I use ubuntu16.04 in my Docker container I found it more useful, but in this installation I have a problem with autoconf so when he hits RUN autoconf it trows this error:

Passing arguments for Dockerfiles using Docker compose

℡╲_俬逩灬. 提交于 2019-12-05 20:50:26
问题 I'm trying to use parametrize my dockerfiles on build phase and use arguments in Docker-compose. For example in Docker compose I have defined one service called bpp as following: bpp: build: context: . dockerfile: Dockerfile.bpp args: gp : 8080 image: serv/bpp restart: always depends_on: - data links: - data I'm trying to pass argument named gp to Dockerfile.bpp, where I'm using argument when starting a Python application, exposing a port etc. For example in dockerfile.bpp in trying to expose

What's the docker-compose equivalent of docker run --init?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 20:30:37
问题 According to https://github.com/krallin/tini#using-tini, tini is built into docker, and can be used by passing the --init flag to docker run . In my case I'm using docker-compose and don't invoke docker run directly. How can I pass this flag? 回答1: If you are using version 2 of docker-compose , the configuration parameter is called init . Example: version: '2.2' services: web: image: alpine:latest init: /usr/libexec/docker-init Please see here for more details: https://docs.docker.com/compose