Skip to content

Instantly share code, notes, and snippets.

View bradbergeron-us's full-sized avatar

Brad Bergeron bradbergeron-us

View GitHub Profile
@bradbergeron-us
bradbergeron-us / Docker_Deploy.md
Last active October 3, 2021 18:18
Deploying a Docker Registry

Deploying a registry server

This section explains how to deploy a Docker Registry either privately for your own company or publicly for other users. For example, your company may require a private registry to support your continuous integration (CI) system as it builds new releases or test servers. Alternatively, your company may have a large number of products or services with images you wish to serve in a branded manner.

Docker's public registry maintains a default registry image to assist you in the deployment process. This registry image is sufficient for running local tests but is insufficient for production. For production you should configure and build your own custom registry image from the docker/distribution code.

Note: The examples on this page were written and tested using Ubuntu 14.04. If you are running Docker in a different OS, you may need to "translate" the commands to meet the requirements of your own environment.

###Simple example with the official image In this section, you cre

# backtick is a kernel operation in Ruby
# which mean it can be overridden
# backtick method is called on the implicit receiver (that is, “self”). That means that you # can do this:
'''
#! bin/env ruby
require 'net/http'
@bradbergeron-us
bradbergeron-us / Rakefile
Created June 2, 2015 04:49
Rakefile for Symlinking dotfiles
desc "Symlink every file"
task :default do
files = Dir.glob("*").reject { |file| file == "Rakefile" }
current_path = File.dirname(__FILE__) + "/"
# Print start message
p "Symlinking: #{files.join(", ")}"
files.each do |file|
sh "ln -vfs #{current_path}#{file} ~/.#{file}"
@bradbergeron-us
bradbergeron-us / NPM N0 more Sudo
Created June 8, 2015 09:38
NPM no more 'sudo'
Copy and paste following commands into terminal
-----------------------------
brew install node --without-npm
mkdir "${HOME}/.npm-packages"
echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.bashrc
echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.zshrc
echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc
curl -L https://www.npmjs.org/install.sh | sh
echo NODE_PATH=\"\$NPM_PACKAGES/lib/node_modules:\$NODE_PATH\" >> ${HOME}/.bashrc
@bradbergeron-us
bradbergeron-us / gulpfile.js
Created June 11, 2015 14:28
Gulp File for Jekyll Blog
// Generated on <%= (new Date).toISOString().split("T")[0] %> using <%= pkg.name %> <%= pkg.version %>
"use strict";
var gulp = require("gulp");
// Loads the plugins without having to list all of them, but you need
// to call them as $.pluginname
var $ = require("gulp-load-plugins")();
// "del" is used to clean out directories and such
var del = require("del");
<% if (amazonCloudfrontS3) { %>// Parallelize the uploads when uploading to Amazon S3