View gitlab_job_highlighter.js
// ==UserScript==
// @name gitlab pipeline job highlighter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description highlight personal jobs, customize for your url (match)
// @author pmbauer
// @match https://gitlab.ddbuild.io/*/pipelines*
// @grant none
// ==/UserScript==
View JavaIsKindaLight.java
package pmbauer;
import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
View Dockerfile
FROM alpine:3.4
ARG FOO
ADD test.sh .
RUN ./test.sh
View my-awesome-sizes.txt
udacity/my-awesome 1.0 7.162 MB
udacity/my-awesome big 251.2 MB
View build.sh
# switches and options:
# --rm : remove volume
# -v : volume mount build folder
# -w : set work area to build folder
# /bin/sh : build script
docker run --rm \
-v $(pwd):/go/src/github.com/udacity/my-awesome \
-w /go/src/github.com/udacity/my-awesome \
golang:1.5-alpine \
/bin/sh -c 'apk add --update git; go get; go build -o target/my-awesome .'
View 1.0.dockerfile
FROM alpine:3.3
COPY target/my-awesome /usr/local/bin/my-awesome
CMD ["my-awesome"]
View big.dockerfile
# golang:1.5-alpine includes the go compiler
FROM golang:1.5-alpine
# Add build tools needed by go get
RUN apk add --update git
# Add source code
COPY . /go/src/github.com/udacity/my-awesome
WORKDIR /go/src/github.com/udacity/my-awesome
View without_cached_history.shell
$ docker build -t without_cached -f without_cached.dockerfile .
[...]
$ docker history without_cached
IMAGE CREATED CREATED BY SIZE COMMENT
19b3d76d50f5 3 weeks ago /bin/sh -c apk add --update curl drill && rm 2.26 MB
70c557e50ed6 6 weeks ago /bin/sh -c #(nop) ADD file:81ba6f20bdb99e6c13 4.794 MB
View without_cached.dockerfile
FROM alpine:3.3
RUN apk add --update curl drill \
&& rm -rf /var/cache/apk/*
View extra_layers.dockerfile
FROM alpine:3.3
RUN apk add --update curl drill
# cleanup index package cache since this is dead weight
# that should not be deployed
RUN rm -rf /var/cache/apk/*