Tag: docker compose

Avoid persisting mongo data in docker-compose

I’m using docker compose to run tests for my application. The configuration looks like: version: ‘2’ services: web: build: . image: myapp:web ports: – “3000:3000” depends_on: – mongo links: – mongo mongo: image: mongo:3.2.6 Right now, when I run docker-compose up, there is a volume created automatically (by docker-compose or the mongo image?) which maps […]

PyCharm Docker Deployment “[Errno 2] No such file or directory”

I’ve set up the Docker Deployment plugin on PyCharm, however, on hitting play, the Deploy log shows a failure with: Could not open requirements file: [Errno 2] No such file or directory: ‘environments/dev/requirements.txt’ I assume that this has something to do with the docker build context that is part of the Docker Deployment plugin. I’ve […]

Link Running External Docker to docker-compose services

I assume that there is a way to link via one or a combination of the following: links, external_links and networking. Any ideas? I have come up empty handed so far. Here is an example snippet of a Docker-compose which is started from within a separate Ubuntu docker version: ‘2’ services: web: build: . depends_on: […]

How to make docker-compose volumes work on Hyper-V?

I’m trying to run an application that uses volumes, but I get an error saying it couldn’t find package.json. 10 error path /usr/src/app/package.json 11 error code ENOENT 12 error errno -2 13 error syscall open 14 error enoent ENOENT: no such file or directory, open ‘/usr/src/app/package.json’ 14 error enoent This is most likely not a […]

Docker / Postgres: Mounting an existing database within a dockerized Postgresql

So I’m having a problem mounting an existing set of data for Docker Postgres that I cannot figure out for the life of me. Here’s my docker compose file. version: ‘2’ services: postgresql: image: postgres:9.5 environment: – PGDATA=/data ports: – ‘5432:5432’ volumes: – ~/.postgresql:/data web: build: . command: sbt/sbt run volumes: – .:/app ports: – […]

Trying to push an image to the docker registry

I am trying to push a docker image to the docker hub (registry) but I am getting an error. What would be the problem here? root@ubuntu-512mb-nyc2-01:~# docker login Login with your Docker ID to push and pull images from Docker Hub. If you `don’t have a Docker ID, head over to https://hub.docker.com to create one.` […]

Overriding VOLUME directive in a Dockerfile

I’m building my own image on top of docker.io/mongo:3.2, but I have a problem with persisting some changes (creating new users) in the build process. I’m aware that this happens because the users are created in the /data/db, which is defined as VOLUME in the original MongoDB Dockerfile. My question is if there is a […]

Running a Command Line Command in One Docker Container from Another and Sharing Files Back

Running docker on the host command line, I can run a command in a container that downloads a set of files, and shares those files back to host via a shared volume: docker run –rm –volume “${PWD}”:/contentmine –tty –interactive psychemedia/contentmine getpapers -q aardvark -o /contentmine/aardvark -x What I would like to do is to be […]

How to do a none interactive pecl install stomp

I’m trying to install stomp php extension as part of a Dockerfile. pecl install has a stomp asking weather to install with openssl extensions, since its all on internal traffic the answer is no so my command looks like RUN printf “\no” | pecl install stomp But that doesn’t seem to pipe to the prompt, […]

Docker Compose run a command

I would like to run a command with docker compose, it is not working, the container starts and disappear without any errors web: image: nginx:latest ports: – “8888:80” volumes: – ./dir:/dir command: bash -c “chown -R www-data:www-data /dir” links: – php I think that the command is being executed but the container stops then, should […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.