Tag: bash

When to use -type d-exec chmod 750 / 640 in docker

I’ve started to work with Docker for local development moving from installing everything on my mac to containers. Looking through a number of projects I regularly see the following shell commands, particularly find /www -type d -exec chmod 750 {} \; \ find /www -type f -exec chmod 640 {} \; Firstly, what are they […]

bash: How do I write a shell script to sftp a mongodump from a MongoDB Docker container inside a DigitalOcean droplet to backup the MongoDB database?

I’m running a MeteorJS webapp deployed with meteor-up on a DO droplet. I would like to have a .sh run from my local machine to get backups occasionally. Folders being able to have timestamps would be a plus. This is what I am trying to achieve with a single .sh file: on local machine: ssh […]

Symfony Process pgrep fails

Here’s my code(Laravel) $process= new Symfony\Component\Process\Process(“pgrep java”); try { $process->mustRun(); } catch (ProcessFailedException $e) { return $e->getMessage(); } return $process->getOutput(); it fails. When I try pgrep –help it succeeds. I tried this when java is running and not. This is the error: I also use Docker by the way, and I’ve already tried: docker-compose exec […]

Installing openssh-server, g++, gdb, and gdbserver in a docker container | Visual C++ for Linux Development + Docker

I would like to install the dependencies for Visual C++ for Linux Development, namely openssh-server, g++, gdb and gdbserver in a docker container. I run a docker container based on an Ubuntu image I have tried ubuntu:14.04, ubuntu:12.04 and ubuntu:latest. I am running the container in interactive mode and using bash to attempt to install […]

User-data script not executed when starting EC2 instance from AWS CLI

I am trying to use the AWS CLI to start an EC2 instance from an image I have that has Docker installed on it, and then supply that instance a script passed in by –user-data to pull an image from the docker hub and run that image. My AWS CLI command starts the instance, but […]

Maven-Wrapper in jHipster inside Docker-Container: FileNotFoundException

I installed docker inside a vm running on lubuntu 16.4. Afterwards I pulled the container jhipster/jhipster according to this tutorial. Accessing it with docker exec -it jhipster bash works fine, also the process of creating an app via yo jhipster. But when I want to run it using the maven wrapper via ./mvnw, the following […]

Docker inside Docker (without command line) [duplicate]

This question already has an answer here: Is it possible to create a docker container that contains one or more containers? [closed] 1 answer

How to create a bash script file in Docker?

I wrote a script that the task is to create a text file and write into two lines. This has been done, but more than once and I do not understand why because the script file does not contain any cycle and once the file is executed. #!/bin/bash <other, non-relevant variables and commands> PHP_ROOT_DIR=/etc/php-5.6.22 PHP_CGI_WRAPPER=php-5622 […]

How to permanently set an environmental variable in an existing docker container?

I have an existing docker container and I would like to set an environmental variable in that container. Can this be done in Docker? If so, how?

Bash restore database to a docker container for a WordPress + Piwik Solution

For the https://github.com/ellakcy/piwik-with-wordpress I am making a restore bash script in order to restore the backup generated from the https://github.com/ellakcy/piwik-with-wordpress/blob/master/scripts/pre-backup script The main idea is to set a path with a tarball containing the backup and recreating the folders that volumes are mounted. The script is the following: #!/bin/bash # Printing functions black=’\E[30;40m’ red=’\E[31;40m’ green=’\E[32;40m’ […]

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