Tag: dockerfile

Utilizing the –user param to create a user with a Dockerfile container

I have a docker container getting passed randomly generated –user id. What I’m trying to do is create a user with that id in the docker file. Like so RUN adduser –disabled-password –uid ${IDHERE} –gid 0 –gecos container container Is this possible in docker? I just need to get the id that is passed to […]

How to provide user defined argument and value in docker run?

I want to achieve something like docker run –delay= I could provide the value for delay using ENTRYPOINT AND CMD without providing argument in docker run but could not find a way to do from docker run. In short, I want to know how to pass user defined argument and value to docker run command […]

Docker Compose Expose Spark Worker UI Ports Dynamically to Host When Scaling

I have Apache Spark running inside a container created via Docker Compose. When I create the worker, I specify which port on the host machine (my laptop) is mapped to the web UI port 8081 on the worker. With 1 container, this works fine because I can bind 8081:8081 and the containerized Spark Master Web […]

dockerize a wpf application and use it

I’m trying to dockerize a wpf application. Just a simple app for that time. for now i got this dockerfile : FROM microsoft/nanoserver WORKDIR C run “$PATH” #ENTRYPOINT [“C:\Users\TestDev\Documents\Visual Studio 2017\Projects\TestExe\TestExe\bin\Release\TestExe.exe”] RUN [“C:\Users\TestDev\Documents\Visual Studio 2017\Projects\TestExe\TestExe\bin\Release\TestExe.exe”] Si i tried with entrypoint, run and cmd. But got this error : The filename, directory name, or volume label […]

docker python SDK – pipe output to a file in exec_run

Using the docker python SDK, I’m trying to pipe output of an echo command to exec_run as follows. container.exec_run([‘echo’,’5′,’|’,’python’,’test.py’]) the test.py has following code s = input() print(s) The output that is produced is : b’5 | python test.py\n’ instead of the expected output of the script. How can this be corrected ?

Should I created three images for Apache http server, php and memcached separately?

I’m dockerizing a php project. My first question is is it a good practice to create three images separately for Apache http server, php and memcached? or it is better to install memcached in php image? If I were to create them separately, how to do the configuration to let Apache http server to support […]

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 […]

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 Docker file stored locally

I have a docker file that includes a python script. So far I pushed it to my github and from there to my docker hub. Afterwards I used the command docker pull name/repo I would like to store the docker file I created with a text editor in a folder together with the python scrip […]

Setting up docker nodejs application with local npm dependencies

We want to start containerizing our applications, but we have stumbled upon some issues with local dependencies. We have a single git repository, in which we have numerous node packages, under “shared” folder, and applications that require these packages. So let’s say our folder structure is as follows: src/ ├── apps │   └── my_app └── […]

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