Skip to content

Instantly share code, notes, and snippets.

View tonistiigi's full-sized avatar

Tõnis Tiigi tonistiigi

  • Docker
  • San Francisco
View GitHub Profile
From 234e37c1b338899f1269981aabc651f3b103c7ec Mon Sep 17 00:00:00 2001
From: Tonis Tiigi <tonistiigi@gmail.com>
Date: Mon, 13 Jul 2020 22:49:20 -0700
Subject: [PATCH] [go1.13] temp fix for darwin/arm64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
---
src/cmd/link/internal/ld/lib.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
FROM --platform=$BUILDPLATFORM tonistiigi/xx:llvm AS build
ARG TARGETPLATFORM
WORKDIR /src
COPY hello.c .
RUN clang -static -o /hello hello.c
FROM scratch
ARG TARGETPLATFORM
ENV WHOAMI=$TARGETPLATFORM
COPY --from=build /hello .
@tonistiigi
tonistiigi / Dockerfile
Last active September 10, 2020 04:37 — forked from brad-jones/Dockerfile
buildkit cache reproducer - see: https://github.com/moby/buildkit/issues/723
FROM alpine:latest AS devel
RUN apk --no-cache add git
RUN mkdir /app
RUN touch /app/foo
FROM scratch AS runtime
COPY --from=devel /app/. /app
#!/usr/bin/env sh
set -eu -o pipefail
: ${TARGETPLATFORM=}
: ${TARGETOS=}
: ${TARGETARCH=}
: ${TARGETVARIANT=}
if [ ! -z "$TARGETPLATFORM" ]; then
» buildctl build --frontend=dockerfile.v0 --local dockerfile=. --local context=. --frontend-opt platform=linux/amd64,linux/arm,linux/arm64 --exporter=image --exporter-opt name=tonistiigi/copy:v0.1.4 --exporter-opt push=true
[+] Building 25.9s (41/41) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 1.0s
=> [internal] load metadata for docker.io/library/golang:latest 0.8s
=> [internal] load metadata for docker.io/library/golang:latest 0.8s
=> [internal] load metadata for doc
445 DockerDaemonSuite.TestDaemonNoSpaceLeftOnDeviceError
10008 2018-07-14 12:46:36 -0700 PDT centos-7-noselinux-devicemapper https://jenkins.dockerproject.org/job/Docker%20Master/label=centos-7-noselinux-devicemapper/10008/
9945 2018-06-12 13:32:03 -0700 PDT ubuntu-1604-zfs-stable https://jenkins.dockerproject.org/job/Docker%20Master/label=ubuntu-1604-zfs-stable/9945/
9759 2018-03-26 03:29:04 -0700 PDT rhel-74-selinux-overlay2-stable https://jenkins.dockerproject.org/job/Docker%20Master/label=rhel-74-selinux-overlay2-stable/9759/
9758 2018-03-26 03:14:10 -0700 PDT rhel-74-selinux-overlay2-stable https://jenkins.dockerproject.org/job/Docker%20Master/label=rhel-74-selinux-overlay2-stable/9758/
9757 2018-03-26 02:35:09 -0700 PDT rhel-74-selinux-overlay2-stable https://jenkins.dockerproject.org/job/Docker%20Master/label=rhel-74-selinux-overlay2-stable/9757/
9755 2018-03-22 09:28:43 -0700 PDT rhel-74-selinux-overlay2-stable https://jenkins.dockerproject.org/job/Docker%20Master/label=rhel-74-selinux-ove
package main
import (
"bufio"
"fmt"
"io"
"os"
"regexp"
"sort"
"strconv"
@tonistiigi
tonistiigi / paint_status.go
Created September 16, 2017 00:39 — forked from alexellis/paint_status.go
paint_status.go
package main
import (
"fmt"
"os/exec"
"strings"
"sync"
"github.com/morikuni/aec"
)
### Keybase proof
I hereby claim:
* I am tonistiigi on github.
* I am tonistiigi (https://keybase.io/tonistiigi) on keybase.
* I have a public key whose fingerprint is 59A3 9F7D BC14 D7BB 3B60 D07C 64F0 8A71 E53F DD42
To claim this, I am signing this object:
@tonistiigi
tonistiigi / run.sh
Created December 6, 2014 11:19
pangalink.net phantomjs ssl
% phantomjs --debug=true --ignore-ssl-errors=true --ssl-protocol=TLSv1 t.js
2014-12-06T13:17:26 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=<filename>' to enable persisten cookie storage)
2014-12-06T13:17:26 [DEBUG] Phantom - execute: Configuration
2014-12-06T13:17:26 [DEBUG] 0 objectName : ""
2014-12-06T13:17:26 [DEBUG] 1 cookiesFile : ""
2014-12-06T13:17:26 [DEBUG] 2 diskCacheEnabled : "false"
2014-12-06T13:17:26 [DEBUG] 3 maxDiskCacheSize : "-1"
2014-12-06T13:17:26 [DEBUG] 4 ignoreSslErrors : "true"
2014-12-06T13:17:26 [DEBUG] 5 localToRemoteUrlAccessEnabled : "false"
2014-12-06T13:17:26 [DEBUG] 6 outputEncoding : "UTF-8"