Skip to content

Instantly share code, notes, and snippets.

Vincent Viallet zbal

View GitHub Profile
zbal / Dockerfile
Created Jan 28, 2019
Dockerfile - Multi step build process for node.js
View Dockerfile
# One single Dockerfile with a multi step build process
# 1. build all native extensions, dependencies, etc.
# 2. copy resulting files into a clean container
FROM node:10-alpine as builder
# Add core packages to allow building native extensions
RUN apk add --no-cache make gcc g++ python
RUN npm install -g yarn
COPY package.json yarn.lock /src/
zbal /
Created Jan 15, 2019 — forked from xuqingfeng/
Demo terraform script for spawning k8s multi AZ cluster in AliCloud

Install terraform

Refer to the official documentation and download page:


export ALICLOUD_ACCESS_KEY="anaccesskey"
export ALICLOUD_SECRET_KEY="asecretkey"
View gist:60fe043de880f4050db5
# Prepare the app
- run: devops nodejs app add
name: "{{ app_name }}"
root: /opt/{{ app_name }}/bundle
script: main.js
node_env: prod
user: devops
extra_env: >
# Builds a custom nginx
RELEASE_TAGS="+lua+$(lsb_release -s -c)"
RELEASE_MESSAGE="Add LUA support to nginx"
View gist:8643893
thing: is
- that
- is
- an
- array
View gist:7800423
# Based on
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
View gist:6971545
Option 1 - using a class:
def run(env, command, args):
plugin = Plugin(env)
# Check if the command is defined in the plugin
if 'do_'+ command not in dir(plugin):
return False
# Call function
getattr(plugin, 'do_'+ command)(args)
zbal / gist:6724926
Last active Nov 7, 2016
new Dockerfile based on the previous base image
View gist:6724926
FROM id_from_prev_build_image
RUN apt-get update
RUN apt-get upgrade -y
RUN echo 'toto' > /test
zbal / gist:6724907
Created Sep 27, 2013
base Dockerfile
View gist:6724907
FROM ubuntu:precise
# Prepare chinese apt mirror - upgrade to latest
RUN printf "deb precise main\ndeb precise universe\n" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
# Cheat upstart
RUN dpkg-divert --local --rename --add /sbin/initctl
zbal / gist:6172020
Last active Oct 4, 2019
rename - delete - create -- git ...
View gist:6172020
Vincents-MacBook-Pro:sandbox balou$ git init
Initialized empty Git repository in /Users/balou/workspace/sandbox/.git/
Vincents-MacBook-Pro:sandbox balou$ vim a
Vincents-MacBook-Pro:sandbox balou$ cat a
Vincents-MacBook-Pro:sandbox balou$ git add a
Vincents-MacBook-Pro:sandbox balou$ git status
# On branch master
You can’t perform that action at this time.