Tag: bash

How to run Python server on Docker's container

I want to run Python HTTP server on docker container. My DockerFile looks like this: FROM continuumio/anaconda3:latest RUN apt-get -y update RUN apt-get -y install linux-headers-amd64 build-essential libc-dev gcc RUN conda install –yes gcc RUN conda install –yes numpy RUN conda install –yes scipy RUN conda install –yes gensim RUN pip install annoy RUN conda […]

Use Docker to compile and run untrusted code in Django App [closed]

I am building a Django web application to compile and run untrusted code in different languages submitted by user. The steps behind compilation are : Take the code from editor provided on run action store in database with a file name run it using bash script. Since there are problems of security, of directly running […]

Docker Jenkins slave wrong character encoding

I’m using this Jenkins slave docker image, it is based on ubuntu:14.04 I would like to use a String Parameter which contains UTF-8 characters. The charachers like öüóőúűáéí (Hungarian characters) will be replaced to question marks As this ticket mentions I tried to pass -e LANG=hu_HU.UTF-8 and bash -c “locale-gen hu_HU.UTF-8” to docker. I also […]

How to get true or false as a response from docker if the service is running or not

I want to check the docker service is running or not; I am expecting true or false as a response: docker service ps data-mapper-service docker service ps -f “node=vm-jcibe-microservice-qa-app01” data-mapper-service These are the command I tried which giving me. It gives me the info on that service if it present. if I do docker service […]

Unable to modify file as part of entry point command

My Dockerfile‘s entry point CMD executes a shell script to modify a local file based on an environment variable before executing my application (Flask). The shell script is like so: cat static/login.html | sed “s/some_match/some_substitute/g” > static/login.html However, I am finding that the resulting file is zero bytes. Any ideas what might be doing on? […]

passing arguments to docker exec from bash prompt and script

I am trying to execute a command inside my mongodb docker container. From my linux command prompt it is pretty easy and works when I do this docker exec -it d886e775dfad mongo –eval ‘rs.isMaster()’ The above tells me to go to a container and execute the command “mongo –eval ‘rs.isMaster()’ – This tells mongo to […]

Issue when I try to create a docker image [duplicate]

This question already has an answer here: Why docker container exits immediately 5 answers

Docker container doesn't start due to CMD and ENTRYPOINT

Dockerfile FROM ubuntu ……………………. ……………………. ……………………. # install magento script ADD script.sh / RUN chmod +x /script.sh ENTRYPOINT [“bash”, “-c”] CMD [“/script.sh”] Docker Build docker build -t test/magento2:1.0.0 . Docker Run docker run -it -d –name docfiletest -h www.hostname.net -e BASE_URL=http://www.hostname.net/ -v /u01/docker/volumes/2.1.6:/var/www/html -p 7012:80 –net mynetwork –ip 172.18.0.14 –privileged test/magento2:1.0.0 Docker logs [bu@bu docker]$ […]

Docker-client: How to attach user input to attachStdin at runtime

I am executing a java program which requires user input during the execution. Below are the methods of docker-client that I am using to execute my command. final String execCreation = docker.execCreate( id, command, DockerClient.ExecCreateParam.attachStdin(), DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr() ); final LogStream output = docker.execStart(execCreation); Whereas command = [“bash”, “-c”, “cd mydockerbuild/ && javac Program.java && java […]

Docker and rancher

i never really understood how to start a docker and how to maintain it alive. I have a question, so when you start a docker in the terminal you must provide a command for the docker so it maintains alive, and when you dont provide a service it restarts everytime, you can provide the /bin/bash […]

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