Zaid Annas
Devsinc inc. 30/08/2018
| FROM ruby:2.3.1 | |
| # Install dependencies | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
| # Set an environment variable where the Rails app is installed to inside of Docker image: | |
| ENV RAILS_ROOT /var/www/app_name | |
| RUN mkdir -p $RAILS_ROOT | |
| # Set working directory, where the commands will be ran: |
| #!/bin/bash | |
| # This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh) | |
| # Improvements | |
| # - Searching in all BASE_PATH, not fixing the search to a depth of 2 | |
| # - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues) | |
| # - Logging in case there's nothing to delete | |
| # - running registry-garbage-collect only when something has been deleted |
| Put this in your `local-configure.yml` file, add as many users as you need: | |
| users: | |
| - name: fulvio | |
| sudoer: yes | |
| auth_key: ssh-rsa blahblahblahsomekey this is actually the public key in cleartext | |
| - name: plone_buildout | |
| group: plone_group | |
| sudoer: no | |
| auth_key: ssh-rsa blahblahblah ansible-generated on default |
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
| #!/bin/bash | |
| # To run locally: ` curl -s https://gist.githubusercontent.com/jeefy/7fed19a335d5caae24639e7ee7be1b71/raw/install-rancher-compose.sh | sh ` | |
| VERSION_NUM="0.9.2" | |
| wget https://github.com/rancher/rancher-compose/releases/download/v${VERSION_NUM}/rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz | |
| tar zxf rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz | |
| rm rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz | |
| sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
To remove a submodule you need to:
| #!/usr/bin/env node | |
| // Reads JSON from stdin and writes equivalent | |
| // nicely-formatted JSON to stdout. | |
| var stdin = process.stdin, | |
| stdout = process.stdout, | |
| inputChunks = []; | |
| stdin.resume(); |