have a docker file set up to launch a supervisord instance inside of ubuntu under virtualbox with the following config: [supervisord] nodaemon=true [program:install] command=bash -c “/src/etc/install.sh” directory=/src/etc/ autorestart=true autostart=true stopwaitsecs=90 redirect_stderr=true stdout_logfile=/var/log/myapp_install.log that is set to launch the following test script file from my src/etc/ directory: #!/bin/bash echo “testing” When I launch /usr/local/bin/supervisord, I get […]
thank you for watching this question. So my question relates to best practices on how to run a script on a docker-compose up directive. Currently i’m sharing a volume between host and container to allow for the script changes to be visible to both host and container. Similar to a watching script polling for changes […]
I’m having an issue storing the output of docker run -it -d -p 43211:3000 –name appname -h hostname -v $PWD/local_dir:/root/remote_dir repo/imagename in a BASH varibale. I tried `backticks`, I also tried running it like the official docs say BASH_VAR=$(docker run …), I even tried storing the output in a file with docker run –…>$FILE_DESCRIPTOR, but […]
I have a bash script, which I use to run several Docker containers. Initialization time differs on system specifications, so sometimes these cannot be started in specified order. How can I detect with use of bash, that a container is running, so following container can be started. Containers requires previously started containers.
New to docker here. I have a series of commands which, if fire them off on the shell, work just fine, but if I put them in a script, don’t. boot2docker destroy boot2docker init boot2docker start boot2docker ssh & host=$(boot2docker ip 2> /dev/null) # everything works fine up to here ssh -i $HOME/.ssh/id_boot2docker -o “StrictHostKeyChecking […]
I have a script like so: #!/usr/bin/env bash eval $(docker-machine env default) The goal is to automate the setting of variables like export DOCKER_TLS_VERIFY export DOCKER_HOST export DOCKER_CERT_PATH export DOCKER_MACHINE_NAME But when I check afterwards, the variables are not set. This is not the case if I run each export command manually. What am I […]
I would like know if there any shortcut command to connect on docker container without run docker exec -it ‘container_id’ bash every time.
I have this Docker file… FROM ubuntu:14.04 MAINTAINER Sindhu S email@example.com # 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/ […]
I have a Dockerfile as follows FROM rajenata/ovs MAINTAINER Rajesh Nataraja <…> COPY initovs /sbin/ ENTRYPOINT [“/sbin/initovs”] CMD [“–help” Then I execute docker run -d rajenata/ovs:2 –net=host –privileged -v /etc/openvswitch:/etc/openvswitch But the initovs script #!/bin/bash if [ -d “/etc/openvswitch” ]; then if [ -f “/etc/openvswitch/conf.db” ]; then echo “DB Exists No Need to Create” else […]
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.