Tag: dockerfile

Add config.txt to docker container

We have a war which needs a configuration file to work. We want to dockerize it. At the moment we’re doing the following: FROM tomcat:8.0 COPY apps/test.war /usr/local/tomcat/webapps/ COPY conf/ /config/ Our containers is losing the advantages of docker because it’s dependent of the configfile. So when we want to execute the .war for other […]

Docker SCRATCH container can't find files

I have a very simple dockerfile: FROM scratch MAINTAINER “aosmith” <a..h@…com> EXPOSE 6379 ADD redis-server /redis-server ENTRYPOINT [“/redis-server”] The docker file is in a folder with a statically compiled copy of redis-server. The build runs find but the container refuses to start: ➜ redis git:(master) ✗ docker run f16 no such file or directory Error […]

Dockerfile setting ENV in different file

I have a Dockerfile which builds a Rails app. The Rails app is dependent upon 20+ environment variables. I would like to extract the setting of these variables away from the original Dockerfile into a different file which is then called by the Dockerfile. Current implementation # Dockerfile RUN gem install bundler RUN bundle install […]

Dockerfile fails when calling rbenv

I’m trying to create a Dockerfile that configures my ruby environment. But it is failing when I try to run docker run -it Dockerfile FROM centos:6.6 # VOLUME /var/lib/mysql # ENV HOME /root # ENV PATH $HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH # ENV SHELL /bin/bash RUN yum update -y RUN yum install git openssl-devel openssl readline-devel readline zlib-devel zlib […]

Docker compose yml inheritance

There are two tasks: run app container, run almost the same deploy-app container. The differences for them, for example, that deploy container does not have port sharing. So, I made configs for this tasks… ./dockerfiles/base.yml: app: net: docker_internal_net environment: APPLICATION_SERVER: “docker” ./dockerfiles/base.run.yml: app: container_name: project-app # set the build context to the project root build: […]

How to escape CMD in Dockerfile

I’ve tried to start a server inside docker via the following syntax permutations: CMD [ “forever”, “start”, “server/server.js” ] CMD [ “forever”, “start”, “server\/server.js” ] CMD forever start server/server.js But each of them has failed. The first two ran as “forever start server” … notice the missing /server.js piece. The last one ran as “/bin/sh […]

Docker Ruby 2.2.3 simply Rails App

I’m following the tutorial “Running a Rails Development Environment in Docker”, but I’m stuck in the 1 point, when I type: docker build -t demo . I’m in the “new rails” folder called demo (the main directory of a new Rails app). I’m using the following Dockerfile: FROM ruby:2.2 MAINTAINER marko@codeship.com # Install apt based […]

php composer with docker build: failed to clone git

I am trying to create a Dockerfile to automate the installation of HumHub following the install guide: https://www.humhub.org/docs/guide-admin-installation.html However, whenever the build script runs composer, I get the following error: Changed current directory to /root/.composer ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev) – Installing fxp/composer-asset-plugin (v1.1.1) Downloading: Connecting… […]

Trying to build openface docker container

I am using docker running El Capitan. I’m new to using docker, and I’m having a bit of an issue building an openface docker container. (Openface is an open source face rec program if you aren’t familiar). I have all of the proper repositories and directories with respect to the instructions on https://cmusatyalab.github.io/openface/setup/ Building a […]

Workdir of Node.JS

I have a dockerfile from nodejs. I’m copying the right folders (which are in my repo after a npm install) and I start the node.js server. It seems to work fine but what I don’t understand is /usr/src/www. I saw it often on the internet. But is it important in which directory you’re running your […]

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