docker-container

Copying data from and to Docker containers

谁说我不能喝 提交于 2019-12-24 08:57:07
问题 I have 2 docker containers running on my system. I wanted to copy the data from one container to another container from my host system itself. i know that to copy data from container to host we have to use docker cp <Source path> <container Id>:path in container Now i am trying to copy the data directly from one container to another, is there any way to do that ?? i tried doing this. docker cp <container-1>:/usr/local/nginx/vishnu/vishtest.txt <container-2>:/home/smadmin/vishnusource/ but the

Docker - accessing files inside container from host

喜你入骨 提交于 2019-12-24 06:33:45
问题 I am new to docker. I ran a node-10 images and inside the running container I cloned a repository, ran the app which started a server with file watcher. I need to access the codebase inside the container, open it up in an IDE running on the windows host. If that is done, then I also want that as I change the files in the IDE these changes induce the filewatcher in the container. Any help is appreciated. Thanks, 回答1: The concept you are looking for is called volumes. You need to start a

Can't perform API request from one docker image to another

隐身守侯 提交于 2019-12-24 02:54:08
问题 Im working on an application where I have a react frontend and a java spring backend. I have a simple API call where I want to return a new address. I have verified this works by using a separate container to perform a curl command docker container run --rm -it --net multichain-network byrnedo/alpine-curl http://multichain-api:8080/api/blockchain/address/create . This call returns the the expected result. Now I have created my docker environments using docker-compose and they are all up and

Docker: Install chrome on Windows container using dockerfile

偶尔善良 提交于 2019-12-23 19:23:09
问题 I am trying to install Chrome on my windows container. I've created my docker image with a dockerfile and I would like to install chrome using this dockerfile. I've tried with the following command RUN apt-get update -qqy \ && apt-get -qqy install \ xvfb \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* but I have an error (I think it's because I am on windows container and this command is only for unbutu container...) : 'apt-get' is not recognized as an internal or external command, operable

web server running inside a docker container running inside an EC2 instance responses very slowly

烂漫一生 提交于 2019-12-21 05:35:08
问题 I have a web server running inside a docker container in AWS EC2 Ubuntu instance. When I send requests to the web server, I get the response very slowly (20+ seconds most of the times, although the response time varies). It does not time-out though . The web server is a very lightweight. It is only to test, so almost does not do anything. docker version 17.03.0-ce docker-compose version 1.12.0-rc1 How I debugged so far When sending requests to the web server running in the docker container

How to rebuild docker container in docker-compose.yml?

非 Y 不嫁゛ 提交于 2019-12-20 07:58:54
问题 There are scope of services which defined in docker-compose.yml. These service have been started. I need to rebuild only one of these and start it without up other services. I run the following commands: docker-compose up -d # run all services docker-compose stop nginx # stop only one. but it still running !!! docker-compose build --no-cache nginx docker-compose up -d --no-deps # link nginx to other services At the end i got old nginx container. By the way docker-compose doesn't kill all

Windows container failed to start with error, “failed to create endpoint on network nat: HNS failed with error : Failed to create endpoint.”

亡梦爱人 提交于 2019-12-19 17:34:38
问题 I have been trying Windows Containers on windows server 2016 TP5. Suddenly I started getting error while running a container with port maping option -p 80:80 c:\>docker run -it -p 80:80 microsoft/iis cmd docker: Error response from daemon: failed to create endpoint sharp_brahmagupta on network nat: HNS failed with error : Failed to create endpoint. I made sure that no other container is running and port 80 on host machine is not being used by any other service. Did anyone face same issue? 回答1

Docker : How are intermediate containers formed

好久不见. 提交于 2019-12-18 10:53:13
问题 I would like to understand the execution steps involved in building Docker Images using Dockerfile. Couple of questions I have listed down below. Please help me in understanding the build process. Dockerfile content #from base image FROM ubuntu:14.04 #author name MAINTAINER RAGHU #commands to run in the container RUN echo "hello Raghu" RUN sleep 10 RUN echo "TASK COMPLETED" Command used to build the image: docker build -t raghavendar/hands-on:2.0 . Sending build context to Docker daemon 20.04

docker-compose creating multiple instances for the same image

送分小仙女□ 提交于 2019-12-17 22:11:47
问题 I need to start multiple containers for the same image. If i create my compose file as shown below, it works fine. version: '2' services: app01: image: app app02: image: app app03: image: app app04: image: app app05: image: app Is there any easy way for me to mention the number of instances for the compose instead of copy and pasting multiple times? 回答1: Updated answer (Oct 2017) As others mentioned, the docker API has changed. I'm updating my answer since it's the one most people will

Copying files from host to Docker container

Deadly 提交于 2019-12-16 19:57:09
问题 I am trying to build a backup and restore solution for the Docker containers that we work with. I have Docker base image that I have created, ubuntu:base , and do not want have to rebuild it each time with a Docker file to add files to it. I want to create a script that runs from the host machine and creates a new container using the ubuntu:base Docker image and then copies files into that container. How can I copy files from the host to the container? 回答1: The cp command can be used to copy