This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.4 | |
ARG FOO | |
ADD test.sh . | |
RUN ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
udacity/my-awesome 1.0 7.162 MB | |
udacity/my-awesome big 251.2 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 .' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
COPY target/my-awesome /usr/local/bin/my-awesome | |
CMD ["my-awesome"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
RUN apk add --update curl drill \ | |
&& rm -rf /var/cache/apk/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker build -t extra_layers -f extra_layers.dockerfile . | |
[...] | |
$ docker history extra_layers | |
IMAGE CREATED CREATED BY SIZE COMMENT | |
6c6fffb28c43 3 weeks ago /bin/sh -c rm -rf /var/cache/apk/* 0 B | |
636b0662bc76 3 weeks ago /bin/sh -c apk add --update curl drill 3.009 MB | |
70c557e50ed6 6 weeks ago /bin/sh -c #(nop) ADD file:81ba6f20bdb99e6c13 4.794 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#params | |
# dd_api_key= | |
# dd_app_key= | |
# screen_id= | |
curl -sX GET "https://app.datadoghq.com/api/v1/screen/${screen_id}?api_key=${dd_api_key}&application_key=${dd_app_key}" \ | |
| jq '{ | |
title: .board_title, | |
description: .board_title, | |
template_variables: .template_variables, |