How can I configure environment variables on a Docker container without hard-coding them in the Dockerfile? [closed]

My dockerfile pulls a code repository from a private source which requires private credentials, and right now they are being hardcoded in the dockerfile as Environment variables. Is there a way to send them as either parameters like: docker run –name myContainer –env USER=user@email.com –env PASS=password sgarcia/myimage Is this possible? edit: I’m an idiot, my […]

How to setup unit test in Docker for nodejs application?

I am trying to run mocha unit test for my node application. The application is built by a docker image. Docker image: FROM node:6.10.0-alpine RUN mkdir -p /app WORKDIR /app COPY package.json /app RUN npm install COPY . /app EXPOSE 3000 CMD [“npm”, “start”] Docker compose: version: “3” services: web: #### nodejs image build: . […]

Docker replicate UID/GID in container from host

When creating Docker containers I keep running into the issue of the UID/GID not being reflected in the container (I realize this is by design). What I am looking for is a way to keep host permissions reasonable and / or to replicate the UID/GID from the host user / group accounts in my Docker […]

TensorFlow with Docker

I’ve created a Docker machine to run TensorFlow: $ docker-machine create –driver virtualbox tensorflow $ eval $(docker-machine env tensorflow) $ docker-machine ls NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS tensorflow * virtualbox Running tcp://193.168.99.101:2376 v1.9.1 Then I try to launch a container with the TesnorFlow dev image: $ docker run -it b.gcr.io/tensorflow/tensorflow:latest-devel But I […]

Docker: Do I need to rebuild the container from scratch whenever I need to add software?

So I’m experimenting with Docker, and I set up a Rails App talking to postgres. Everything works, I’m able to access the app, migrate the database, etc. Dockerfile FROM ruby:2.2.1 RUN apt-get update -qq && apt-get install -y build-essential RUN apt-get install -y libxml2-dev libxslt1-dev RUN apt-get install -y libqt4-webkit libqt4-dev xvfb RUN apt-get install […]

Relationship Between a Deis Cluster and Scale command?

I have a question about how clusters and scaling are related, which I couldn’t work out from the docs. The architecture page is pretty clear, but maybe I’m making some incorrect assumptions. If I set up a cluster of, say 4 CoreOS hosts, when I git push my apps to the cluster, a docker container […]

How to run GUI application from linux container in Window using Docker?

I have a QT based GUI application which i compiled in docker (centos image). I am able to launch GUI application from inside Centos image in my Linux machine(OpenSUSE 13.2) Following instruction from this blog “http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker” Same thing i want to do via window.I installed window docker . I loaded the desired centos images having […]

remote docker commands execution

Now I have two laptops (not necessary in one local network) and docker installed on both of them. My goal is to run docker daemon on the first laptop and be able to execute commands using docker client on the second laptop. What should I do to achieve the goal?

debug spring-boot in docker

For some reason I have issues connecting remote debug to a spring-boot app running inside docker. I start the java app with: java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar app.jar For docker I expose these ports on docker-compose: ports: – “8080:8080” – “8000:8000” However, the debugger is not able to connect on port 8000. It works when I […]

how to configure docker to use apache and php in separate containers

i need to setup a particular LAMP environment using docker, with : debian squeeze 6.0.10 apache 2 php 5.6 mysql 5.5 having app code hosted on a base image with debian + apache, i wonder if it’s possibile to use a php container instead default php server installed on debian container ( witch is 5.3 […]

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