Skip to content

Instantly share code, notes, and snippets.

View tianon's full-sized avatar
❤️
TIANON

Tianon Gravi tianon

❤️
TIANON
View GitHub Profile
@tianon
tianon / Dockerfile
Created June 29, 2015 22:47
Dockerfile heredoc idea
FROM debian:jessie
RUN <<EOI
set -e
apt-get update
apt-get install -y \
package \
package \
package
EOI
@tianon
tianon / Dockerfile
Last active August 29, 2015 14:23
Rust starter for Peter
FROM debian:jessie
# pub 4096R/FA1BE5FE 2013-09-26
# Key fingerprint = 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
# uid Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE
ENV RUST_VERSION 1.0.0
RUN set -x \
#!/bin/bash
set -e
# https://gist.github.com/tianon/92ebbd1793864b9586bc
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
hackVendor="$(< hack/vendor.sh)"
if [ "$1" ]; then
hackVendor="$(git show "$1":hack/vendor.sh)"
#!/bin/bash
set -e
deb="$(mktemp --tmpdir build-deps-XXXXXXXXXX.deb)"
trap "rm -f '$deb'" EXIT
"$(dirname "$(readlink -f "$BASH_SOURCE")")/make-build-deps.sh" "$deb"
dpkg --unpack "$deb"
depsPackage="$(dpkg-deb -f "$deb" Package)"
github.com/Sirupsen/logrus
github.com/docker/libcontainer/apparmor
github.com/docker/libcontainer/configs
github.com/docker/docker/pkg/ulimit
github.com/docker/docker/autogen/dockerversion
github.com/docker/docker/pkg/ioutils
github.com/docker/docker/pkg/promise
github.com/docker/docker/pkg/units
github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar
github.com/docker/docker/pkg/common
@tianon
tianon / script.sh
Last active August 29, 2015 14:16
windows dind for docker jenkins
commithash="$(git log -1 --shorthashwhateveritis)"
docker build -t "docker:$commithash" .
docker run -it --privileged -d --name "docker-$commithash" -p 2375 -P "docker:$commithash" bash -c 'hack/make.sh binary && exec bundles/docker-*/binary/docker -d -D -H tcp://0.0.0.0:2375'
port="$(docker inspect -f '{{index .NetworkSettings.Ports "2375/tcp" 0 "HostPort"}}' docker-$commithash)"
ip="${DOCKER_HOST#*://}"
ip="${ip%%:*}"
(
export DOCKER_HOST="tcp://$ip:$port"
# the rest as it is right now, blah blah blah ./hack/make.sh dynbinary test-integration-cli
gpgv: Signature made Tue Mar 3 14:00:20 2015 MST using RSA key ID 46925553
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>"
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing description
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing architecture
Selecting previously unselected package base-passwd.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack .../base-passwd_3.5.37_amd64.deb ...
Unpacking base-passwd (3.5.37) ...
@tianon
tianon / Makefile
Last active August 29, 2015 14:16
generated, parameterized Dockerfiles
# ...
build:
./hack/generate-dockerfile.sh > Dockerfile
docker build -t docker .
# ...
diff --git a/gcc/content.md b/gcc/content.md
index 1397f19..2953720 100644
--- a/gcc/content.md
+++ b/gcc/content.md
@@ -1,10 +1,6 @@
# What is GCC?
-The GNU Compiler Collection (GCC) is a compiler system produced by the GNU
-Project that supports various programming languages. GCC is a key component of
-the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the
#!/bin/bash
set -e
str='docker run'
str+=' {{printf "--name=%q" .Name}}'
str+='{{if (eq .HostConfig.NetworkMode "bridge")}} {{printf "--hostname=%q" .Config.Hostname}}{{else}} {{printf "--net=%q" .HostConfig.NetworkMode}}{{end}}'
str+='{{if .Config.OpenStdin}} --interactive{{end}}'
str+='{{if .Config.Tty}} --tty{{end}}'