Docker run – User group not working as expected?

I have a script that communicates over serial port (/dev/ttyUSB0). I want to run it from within a Docker image. However I don’t seem to have permissions to do it from within the image. I follow these steps: On my host, if I run ln -l /dev/ttyUSB0 I get: crw-rw—- 1 root dialout 188, 0 […]

How to use nested docker.image('test_image').inside() in a Jenkins pipeline

I have a jenkins container which triggers a maven container to build a java code. Now I want to test the same code with selenium. I have another container for selenium server. But the command to run the test using selenium is a mvn command which needs Maven. Since I am executing this inside the […]

Docker unable to mount volume with node app

I have create a local node express app and now I am trying to run the node app via Docker. docker run -p 8080:3000 -v $(pwd):/var/www -w “/var/www” node npm start npm info it worked if it ends with ok npm info using npm@5.0.3 npm info using node@v8.1.2 npm ERR! path /var/www/package.json npm ERR! code […]

Docker proper redirect link

I have Dockerfile: FROM cloudron/base:0.10.0 ENV PATH /usr/local/node-6.9.5/bin:$PATH WORKDIR /tmp COPY package.json /tmp/ RUN npm config set registry && npm install WORKDIR /usr/src/app COPY . /usr/src/app RUN cp -a /tmp/node_modules /usr/src/app RUN npm run build EXPOSE 8000 CMD [ “npm”, “run”, “start:production” ] if I run this by: docker run -p 8000:8000 -t somename/appname […]

How to compile apache2 own module in dockerfile?

I want to compile my own Apache module when building my image, so i wrote the following Dockerfile. FROM httpd:2.4.25 COPY conf/httpd.conf /usr/local/apache2/conf/httpd.conf COPY modules/mod_example.c /usr/local/apache2/modules/mod_example.c RUN apxs -i -a -c modules/mod_example.c EXPOSE 80 But i get an error : /usr/share/apr-1.0/build/libtool –silent –mode=compile x86_64-linux-gnu-gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/apache2/include -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -c […]

How to wait a ResultCallback from DockerClient.waitContainerCmd()?

In our J2EE project, we’re doing some video conversion by calling sjourdan/ffmpeg docker from our java code, relying on docker-java. For now, it looks something like this (quite simplified for brevity): CreateContainerCmd createCommand = dockerClient.createContainerCmd(“sjourdan/ffmpeg”) .withVolumes(aVolume) .withBinds(aBind) .withCmd(“a lot of options about the conversion itself, codec, ratio, …”); CreateContainerResponse container = createCommand.exec(); dockerClient.startContainerCmd(container.getId()).exec(); // vanilla […]

Deploying Docker Data Volumes

How do I deploy a named data volume, with contents, to nodes in a swarm? Here is what I want to do, as described in the Docker documentation: “Consider a situation where your image starts a lightweight web server. You could use that image as a base image, copy in your website’s HTML files, and […]

Docker pull is not giving real time downloaded-size/total-size when executed through Node.js child process sync

When I run docker pull my-image from my terminal this is how my output looks like. 59e69571f6c7: Pull complete 43da27f69c98: Pull complete d22174e9eddd: Pull complete cc0ac48a6d21: Downloading 312.3 MB/2.888 GB b47aa969d5dc: Download complete When I run a piece of Node.js code const { exec } = require(‘child_process’); exec(‘docker pull my-image’, (error, stdout, stderr) => { […]

Cant mount volume docker run

Can’t mount volumes with below script docker run –server -p 8080:80 -v /d/XAMPP/htdocs:/var/www/html -d php:7.0-apache When I try docker run –server -p 8080:80 -v /d:/var/www/html -d php:7.0-apache With this command only XAMPP folder is mounting in docker and I don’t see any folders inside, and I have 403 when I try to access root folder […]

Running a script from a mongodb docker-container

I have script that restores the database mongorestore –port 27017 –db myapp `pwd`/db-dump/myapp I want to run this in a short lived docker-container using the image mvertes/alpine-mongo. To run a shortlived container the –rmis used: docker run –rm –name mongo -p 27017:27017 \ -v /data/db:/data/db \ mvertes/alpine-mongo But how do I execute my script […]

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