Tag: bash

Rails Project on Docker

I use Docker to run the Rails Project,but it can’t run never,I’m very sad. This is the start_up.sh: #!/usr/bin/env bash docker rm $(docker ps -a -q) docker rmi $(docker images -q -f dangling=true) docker-compose -f docker-compose.dev.yml build docker-compose -f docker-compose.dev.yml up and the docker-compose.dev.yml: redis: image: daocloud.io/daocloud/dao-redis:master-init environment: – REDIS_PASS=**None** ports: – “6379:6379” web: build: […]

Trouble executing lsb-release in a Bitbucket Pipelines docker instance

I have a Bitbucket Pipelines yaml that looks like this: image: python:3.5.1 pipelines: branches: master: – step: script: – apt-get update – apt-get install lsb-release -y – curl –silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add – – VERSION=node_5.x – DISTRO=”$(lsb-release -s -c)” – echo “deb https://deb.nodesource.com/$VERSION $DISTRO main” | tee /etc/apt/sources.list.d/nodesource.list – echo “deb-src https://deb.nodesource.com/$VERSION $DISTRO main” […]

get container's name from shared directory

Currently I am running docker with more than 15 containers with various apps. I am exactly at the point that I am getting sick and tired of looking into my docs every time the command I used to create the container. Trying to create scripts and alias commands to get this procedure easier I encountered […]

docker current not installed – bash on ubuntu on windows 10

I’ve installed docker on bash on ubuntu on windows 10: sudo apt-get install -y docker but when i try to use it: docker -v it gives me the following error: The program ‘docker’ is currently not installed. You can install it by typing: sudo apt-get install docker When I try to reinstall it, I get […]

Generating -bind parameter in Consul JSON files for use with Marathon

I am working on launching Consul containers on docker with Marathon and I’ve run into a somewhat subjective issue regarding creating the JSON files. Currently I plan to launch containers with JSON files of this format server-1.json { “id”: “consul-server-2”, “cmd”: “consul agent -server -client=0.0.0.0 -ui -bind=100.10.30.40 -retry-join=server-1.local -data-dir=/tmp/consul”, “cpus”: 1, “mem”: 512.0, “instances”: 1, […]

'set' command work differently in terminal and in script in Docker

I have set some environment variables(available only at runtime not known while creating container) in a running docker container as I explained here Now when I go inside the container and run ‘set’ command I can see the environment variables but ‘env’ command does not show the variables I set using script. Now I want […]

How to connect Docker containers in series?

Question: Is there a tool to create series of Docker containers? My use case In a nutshell: idea: enrich CSV data and transform to RDF two main steps: enrichment of CSV transformation CSV to RDF I would like to put each main step into its own Docker container with defined input and output. Later more […]

How To run from host machine bash script inside docker container and remain in bash in container [duplicate]

This question already has an answer here: Invoke bash, run commands inside new shell, then give control back to user 5 answers

sh script unable to get executed in New Empty Docker Container

I have a .sh script below when get executed in New Empty Docker container gives below error. I am unable to find where exactly is the issue. My aim is to connect to install Jenkins in Empty container using sh script. jenkins.sh script # Install Java: yum -y install java # Verify java install: java […]

Run script in background inside docker container from host

I am trying to run a script in docker container that starts a service inside the container. I run this script from an application (running in the host machine) and this application runs multiple scripts inside several containers. All other scripts my application is running inside these container, executes successfully and prepares the environment for […]

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