docker-compose

Connecting FTP container works with docker-compose and not with docker run

给你一囗甜甜゛ 提交于 2019-12-11 15:38:59
问题 I need to connect FTP server from my_go_app container. When I do it from it from docker compose, I can do it with: apk add lftp lftp -d ftp://julien:test@ftpd-server and it connects well but when I try to run my container via docker run , I cannot connect anymore to FTP server Here the command I use: docker run --name my_go_app --rm -v volume:/go my_go_app:exp --network=my_go_app_network --env-file ./test.env Here is the working docker-compose.yml version: '3' services: my_go_app: image: my

Can't access mysql container from node but from terminal

a 夏天 提交于 2019-12-11 15:37:42
问题 I created a node application that is run by a docker-compose . The application needs a mysql server which is also started but when I get to the point in my node application to access the server I get the following error: events.js:136 throw er; // Unhandled 'error' event ^ Error: connect ECONNREFUSED 127.0.0.1:3306 at Object._errnoException (util.js:1031:13) at _exceptionWithHostPort (util.js:1052:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1195:14) -------------------- at

Connecting to docker container from outside docker-compose container

不羁的心 提交于 2019-12-11 15:26:09
问题 Our two services We have LXV virtual-machine-1 where we have docker-compose with service-1 and other services. We have another LXV virtual-machine-2 where we have docker-compose with service-B and new other services. Let's assume these two services use ports 80 and 81 Question How to connect from service-1 to service-B in separate docker compositions in separate LXV virtual machines. What we tried We changed hosts file on LXV virtual-machine-2 by adding mapping service-1 and ip address of

Load Balacing Nodejs application using Nginx and Docker

浪子不回头ぞ 提交于 2019-12-11 15:15:39
问题 I am following this YouTube tutorial on how to configure Nginx Server on Docker /docker_compose.yml version: '3' services: nodecluster: build: nodecluster ports: - "49160:8000" proxy: build: proxy ports: - "80:80" nodecluster/Dockerfile FROM node:8 # Create app directory WORKDIR /usr/src/app # Install app dependencies # A wildcard is used to ensure both package.json AND package-lock.json are copied # where available (npm@5+) COPY package*.json ./ RUN npm install # If you are building your

Unknown variable “management.load_definitions” in rabbitmq rabbit.conf file

*爱你&永不变心* 提交于 2019-12-11 15:11:12
问题 Background We have a RabbitMQ management docker image in a docker-compose setup and we are trying to launch rabbit with some users, vhosts and exchanges already added. However, the bootup is crashing and we don't know why. What we tried We have a folder called "rabbitmq" with the following files (this is our configuration folder): definitions.json { "rabbit_version": "3.8.2", "users": [ { "name": "user1", "password_hash": "user1", "hashing_algorithm": "rabbit_password_hashing_sha256", "tags":

How to set up separate .env for development and production using Docker

早过忘川 提交于 2019-12-11 15:11:03
问题 Coming from an environment where I was manually doing a ssh into the remote server, doing a git pull and creating my .env (since it is gitignored), how do I separate development .env and a production .env . I used docker-machine to create an AWS EC2 instance. I created a production.yml and did docker-compose -f production.yml up -d . The container in the EC2 machine picked up my development .env which is not what I want. Dockerfile FROM python:3.6-alpine ENV PYTHONUNBUFFERED 1 RUN apk update

Can a .dockeringore file include a volume folder?

谁都会走 提交于 2019-12-11 15:05:40
问题 Imagine a project folder like this: project_folder source_code_folder_1 docker_volume_folder source_code_file_1 Dockerfile docker-compose.yml .dockerignore Now, if the Dockerfile contains an instruction ADD . /code/ , and if the docker-compose.yml file configures a service that uses the docker_volume_folder in its volume mapping, can I then add the docker_volume_folder in the .dockerignore file, to prevent that the volume folder is copied to the docker container by the ADD . /code/

how to link and run mysql database and tomcat server on kubernetes clusture?

女生的网名这么多〃 提交于 2019-12-11 15:05:15
问题 How to link my tomcat container having war file in webapps folder to another container having mysql database.currently if i start my war file in tomcat manager app i get error saying could not start application at contextpath /data-core-0.0.1-SNAPSHOT catalina lifecycle exception. I think my tomcat container cant access the mysql database container!! statefulset.yaml serviceName: mysql template: metadata: labels: name: mysql spec: containers: - name: mysql image: suji165475/vignesh:latest

docker file to run automation test in JS files

爷,独闯天下 提交于 2019-12-11 14:59:15
问题 I am trying to create a docker file to run selenium tests for a java script based project. Below is my docker file so far: #base image FROM selenium/standalone-chrome #access to the project within docker container - Bundle app source COPY ./seleniumTest/project /app # Install Node.js RUN sudo apt-get update RUN sudo apt-get install --yes curl RUN curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash - #binding EXPOSE 8080 #Define runtime ENTRYPOINT /app/login.test.js while

Dockerfile COPY failed: stat /var/lib/docker/tmp/docker-XXXX

纵然是瞬间 提交于 2019-12-11 14:41:01
问题 I got this docker-compose.yml file version: '2' services: db: image: mysql volumes: - ./.data/db:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} networks: - docker-network php: build: context: ./php7-fpm args: TIMEZONE: ${TIMEZONE} volumes: - ${BACK_APP_PATH}:/var/www environment: APP_ENV: "dev" networks: - docker-network And in my php7-fpm Dockerfile i'm trying to copy some