Tag: dockerfile

Using environment variables post docker container linking in java

I am trying to simulate docker container linking using a simple use case which is as follows 1) A docker container with a simple pub-sub java application, there is a publisher and subscriber both within the same container. I have used dockerfiles for building this 2) A docker container running rabbitmq, this was pulled from […]

Why does the path command doesn't work in Docker file

This is my docker file # This is a comment FROM chapmanb/bcbio-nextgen-devel MAINTAINER Sabarish Subramanian RUN mkdir /root/software && cd /root/software && wget http://bio.math.berkeley.edu /eXpress /downloads/express-1.5.1/express-1.5.1-linux_x86_64.tgz RUN cd /root && mkdir src && cd src && tar xzf ../software/express-1.5.1-linux_x86_64.tgz && PATH=$PATH:/root/src/express-1.5.1-linux_x86_64 && export PATH && echo $PATH In the new docker container the path is […]

How copy files from current docker container to another container

I am building a docker container with a nodejs application, which will be build from meteorJS. For the build a shell runner is used (`meteor build /opt/project/build/core –directory) as this is all done in a gitlab CI. build: stage: build tags: – deploy before_script: – docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY – meteor npm […]

Starting a process in the Dockerfile

My problem is the following: I need to start a container with the dnsmasq service running (but that could be any service). The hard point is that I created a user in my image, so when I create a container out of it, it starts with my custom user (no root). Therefore, how can I […]

docker pull using puppet not working

docker pull www.alm-docker-registry.com:8090/test… is working but when i am trying to do the same thing using puppet script, its showing error. Notice: /Stage[main]/Main/Exec[Pulling Docker Image]/returns: 2015/01/30 11:11:11 Authentication is required. Error: /usr/bin/docker pull www.alm-docker-registry.com:8090/test… returned 1 instead of one of [0] Error: /Stage[main]/Main/Exec[Pulling Docker Image]/returns: change from notrun to 0 failed: /usr/bin/docker pull www.alm-docker-registry.com:8090/test… returned […]

Docker best practice on base images and host os

I have a questition about the best pratices on using docker in production. In my company we use SLES12 as host os. Should we use SLES also as base for our docker containers? In my opinion SLES image is too big to follow the ddocker recommendation for small base images. My questition is: Has anyone […]

docker: cannot map two container ports to one host port

app.json for pm2 (src/app.py is Flask app): { “apps”: [ { “exec_mode”: “fork”, “script”: “src/app.py”, “args”: [“-p”, “8080”] }, { “exec_mode”: “fork”, “script”: “src/app.py”, “args”: [“-p”, “8081”] } ] } ~ Dockerfile: EXPOSE 8080 8081 CMD [“pm2”, “start”, “app.json”] Error when running docker: docker run -p 8080:8080 -p 8080:8081 oct20 docker: Error response from daemon: […]

Docker run script in host on docker-compose up

thank you for watching this question. So my question relates to best practices on how to run a script on a docker-compose up directive. Currently i’m sharing a volume between host and container to allow for the script changes to be visible to both host and container. Similar to a watching script polling for changes […]

How to execute .jar from pom.xml from cloned project in Dockerfile

I have this in my Dockerfile: FROM maven:3.3-jdk-8-alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app RUN apk add –no-cache curl tar bash wget git RUN git clone https://MyProfile@bitbucket.org/MyProfile/myproject.git RUN cd myproject WORKDIR /usr/src/app/myproject ONBUILD ADD . / ONBUILD RUN mvn install EXPOSE 4568 CMD [“java”,”-jar”,”/usr/src/app/myproject/target/ReadDocFile.jar”] I was able to figure out how to install pom from […]

Can I run custom .sh files while building docker image?

I want to use docker with custom nginx module. So I have to download nginx, extract, rebuild and install it. It’s a lot of work. Can I implement this logic in .sh file and ask docker to execute this file while building image. I tried: ADD nginx/nginx-build.sh /home/fbelov/nginx-build.sh RUN [“/home/fbelov/nginx-build.sh”] but it doesn’t work —> […]

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