Tag: bash

Can't use docker-compose despite I installed it

I installed Docker-machine and Docker-compose in my container via the Dockefile: RUN curl -L https://github.com/docker/machine/releases/download/v0.9.0/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \ chmod +x /usr/local/bin/docker-machine RUN curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \ chmod +x /usr/local/bin/docker-compose but I can only use docker-machine. When I want to use docker-compose it says: bash-4.3# ls /usr/local/bin/ docker-compose docker-machine […]

I am able to fetch the URL from Rancher Stack using Putty. How do I fetch the same URL from a Rancher Stack using shell commands in Jenkins

setenv RANCHER_SECRET_KEY xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx setenv RANCHER_ACCESS_KEY xxxxxxxxxxxxxxxxxx setenv RANCHER_URL http://xxxxxxxx.xxxxx.com:8080 cd /local/mnt/workspace/username/xxxxxxx/ make cluster-up mak‚Äče idcluster | tail -1 | cut -d’ ‘ -f1 output: http://10.10.120.90:23884 I need the same URL as output from Pre steps build of Jenkins. I am able to do this manually from Putty.

How to enable colors in a Docker container?

Context I have a Docker Compose with which I run several containers. My docker-compose.yml: version: ‘2’ services: web: build: ../application-web/ ports: – “80:80” tty: true # Add a volume to link php code on the host and inside the container volumes: – ${application_PATH}:/usr/share/application – ${application_PATH}/docker_files/docker-assistant:/usr/share/assistant depends_on: – custom-php – custom-mysql links: – custom-php:custom-php – custom-mysql:custom-mysql […]

Backslash preservation with Docker, echo, and Perl

I am using perl to call docker exec in a very specific way to echo information into /etc/bashrc within a Docker container. I have two Perl variables that I need interpolated into the echo command. $c_name will usually have a value of test1 or something.$net_ip will usually have a value of 192.168.0.x my $prompt = […]

Bitbucket API version 1

How to set branch restriction in bit-bucket through API version 1 ? as my server doesn’t support version 2 if some share any example with curl then it’ll really helpful.

mounting sdb on /mnt using docker and openfoam

I recently found the post entitled “How to mount volumes in docker release of openFOAM” post on this site on October 2016. That post asks about automatically mounting an already mounted (under bash or csh) volume through the Docker version of openfoam. Hopefully, this is explained below. I have the situation that under csh, the […]

Ubunto docker sh mysql script run

I have a script which build my docker env. I have this line: docker exec -it guac-mysql /bin/bash mysql -u root -p123456 CREATE DATABASE guacamole; CREATE USER ‘guacamole’ IDENTIFIED BY 123456; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole.* TO ‘guacamole’; FLUSH PRIVILEGES; quit When I run, the script gets in the bash on the container, but the other […]

How to restart a Celery Worker in Airflow

I’m currently running into an issue where my Celery worker freezes once in a while and needs to be restarted. I have an instance of Airflow from which I would like to configure and schedule a restart using the BashOperator or SSHOperator, but I’m not sure how to proceed since it’s in a Docker container. […]

Automate process during docker push

Can I add a hook that runs whenever I do a docker push? I’m using docker for the first time, I have installed CLAIRCTL and I have success doing statics analysis by analyzing images manually and generating reports, but I want that to be automatic. How can I do an automatic process to analyze all […]

docker behind proxy doesn't use system proxy info

I have installed docker and it wasn’t working even though proxy was setup. Our corporate proxy requires username:password@proxy.I was using bash script to set proxy when needed. It asks me username:password and sets up proxy for the session. I went through https://docs.docker.com/engine/admin/systemd/#httphttps-proxy Docker proxy setup wants me to hard-code my user and pass info. How […]

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