Tag: shell

Run command in background does not work

My aim is to start docker in background. Due to some issues with services, I want to start docker manually in background. Here my approach, where I run the docker daemon in background, so I don’t have the output on the command line and the command line is not blocked by the process. HTTP_PROXY=http://example.net:8080 HTTPS_PROXY=http://example.net:8080 […]

Docker : initial installation script fails (ubuntu 13.04 , kernel 3.8+)

I created this script according to docker.io installation instructions for Ubuntu 13.04 with 3.8+ kernel, but script is interrupted as lxc-docker installation fihishes. ssh -o StrictHostKeychecking=no -t -t -i $CERT $USER@$SERVER <<‘ENDSSH’ sudo DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:dotcloud/lxc-docker sudo DEBIAN_FRONTEND=noninteractive apt-get -y update sudo DEBIAN_FRONTEND=noninteractive apt-get -y install lxc-docker echo […]

Dockerfile won't run script as user with sudo rights

I have this Docker file… FROM ubuntu:14.04 MAINTAINER Sindhu S sindhu@alum.hackerschool.org # RUN apt-get update && apt-get -y install sudo wget bash git && rm -rf /var/cache/apt-get/archives/* RUN adduser –disabled-password –gecos “” scrollback RUN adduser scrollback sudo RUN echo ‘scrollback ALL=(ALL) NOPASSWD:ALL’ >> /etc/sudoers RUN mkdir -p /home/scrollback && chown -R scrollback:scrollback /home/scrollback WORKDIR /home/scrollback/ […]

Docker: wget for https does not work

In my docker file I have below command RUN wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar But in build I get below error: The command ‘/bin/sh -c wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar’ returned a non-zero code: 8 I tried –no-check-certificate and -U but got same error.

installing transmission on debian with docker, right trouble

I am a biginner with docker, I try to make my transmission container work! First I am running on a debian 8.1. To make things work I created this 2 folder: mkdir -p /opt/docker/transmission/config mkdir -p /opt/docker/transmission/downloads after this I added the “good” right: chown -R root:docker /opt/docker chmod -R 775 /opt/docker At the end […]

How to check if a process is running inside docker container

[Updated1] I have a shell which will change TCP kernel parameters in some functions, but now I need to make this shell run in Docker container, that means, the shell need to know it is running inside a container and stop configuring the kernel. Now I’m not sure how to achieve that, here is the […]

Unable to run shell command with docker?

I have installed docker on Ubuntu 14.04. Now when i am trying to create one test job in docker, i am getting the below error: $ sample_job=$(docker run -d busybox /bin/sh -c “while true; do echo Docker; sleep 1; done”) –bash: command substitution: line 228: syntax error near unexpected token `do’ -bash: command substitution: line […]

How to SSH into running docker container from jenkins execute shell

I am running a docker container (dind) from jenkins execute shell CONTAINER_ID=”$(sudo docker run –privileged -i -d jpetazzo/dind)” To execute docker commands inside container I get into container shell sudo docker exec -it –privileged ${CONTAINER_ID} bash and than I am trying to execute these commands inside dind container. sudo docker pull hubuser/hello-world sudo docker run […]

Launching Docker demon from Java Service

Trying to launch a docker container in demon mode using shell script from java service deployed on Tomcat, on an ubunty based VM. I have a java based REST service which has been deployed on tomcat, on the same VM i have installed Docker. I have created a shell file to launch my docker container. […]

No suitable driver found for jdbc:postgresql when trying to connect spark-shell (inside a docker container) to my PostgreSQL database

I’m running Spark on a docker container (sequenceiq/spark). I launched it like this: docker run –link dbHost:dbHost -v my/path/to/postgres/jar:postgres/ -it -h sandbox sequenceiq/spark:1.6.0 bash I’m sure that the postgreSQL database is accessible through the address postgresql://user:password@localhost:5432/ticketapp. I start the spark-shell with spark-shell –jars postgres/postgresql-9.4-1205.jdbc42.jar and since I can connect from my Play! application that has […]

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