mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-06 16:18:00 +08:00
Build sslip.io Dockerfiles for both ARM64 & AMD64
...because, hey, I have a Mac, and native is about 10x faster than amd64 emulation. Also because it's cool. I had to compile my own version of Concourse's [`registry-image`](https://github.com/concourse/registry-image-resource) container image because the one shipped with Concourse 7.8.3 is old and doesn't have the multi-platform feature: ``` docker build --build-arg base_image=ubuntu -t cunnie/registry-image -f dockerfiles/ubuntu/Dockerfile ``` Switch Alpine → Fedora to address weird connection issue: ``` > [linux/arm64 3/3] RUN wget https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-arm64 -O /usr/sbin/sslip.io-dns-server; chmod 755 /usr/sbin/sslip.io-dns-server: Connecting to github.com (192.30.255.113:443) wget: error getting response: Connection reset by peer ``` [#21]
This commit is contained in:
@@ -36,7 +36,7 @@ jobs:
|
||||
DOMAIN: sslip.io
|
||||
- name: build-and-push-sslip.io-dns-server
|
||||
plan:
|
||||
- get: sslip.io-release
|
||||
- get: sslip.io
|
||||
trigger: true
|
||||
- task: build-task-image
|
||||
privileged: true
|
||||
@@ -47,20 +47,23 @@ jobs:
|
||||
source:
|
||||
repository: concourse/oci-build-task
|
||||
inputs:
|
||||
- name: sslip.io-release
|
||||
- name: sslip.io
|
||||
outputs:
|
||||
- name: image
|
||||
params:
|
||||
CONTEXT: sslip.io-release/k8s/
|
||||
DOCKERFILE: sslip.io-release/k8s/Dockerfile-sslip.io-dns-server
|
||||
CONTEXT: sslip.io/k8s/
|
||||
DOCKERFILE: sslip.io/k8s/Dockerfile-sslip.io-dns-server
|
||||
IMAGE_PLATFORM: linux/arm64,linux/amd64
|
||||
OUTPUT_OCI: true
|
||||
run:
|
||||
path: build
|
||||
- put: sslip.io-dns-server
|
||||
params:
|
||||
image: image/image.tar
|
||||
image: image/image
|
||||
|
||||
- name: build-and-push-k-v.io-nginx
|
||||
plan:
|
||||
- get: sslip.io-release
|
||||
- get: sslip.io
|
||||
trigger: true
|
||||
- task: build-task-image
|
||||
privileged: true
|
||||
@@ -71,20 +74,23 @@ jobs:
|
||||
source:
|
||||
repository: concourse/oci-build-task
|
||||
inputs:
|
||||
- name: sslip.io-release
|
||||
- name: sslip.io
|
||||
outputs:
|
||||
- name: image
|
||||
params:
|
||||
CONTEXT: sslip.io-release/k8s/
|
||||
DOCKERFILE: sslip.io-release/k8s/Dockerfile-k-v.io-nginx
|
||||
CONTEXT: sslip.io/k8s/
|
||||
DOCKERFILE: sslip.io/k8s/Dockerfile-k-v.io-nginx
|
||||
IMAGE_PLATFORM: linux/arm64,linux/amd64
|
||||
OUTPUT_OCI: true
|
||||
run:
|
||||
path: build
|
||||
- put: k-v.io-nginx
|
||||
params:
|
||||
image: image/image.tar
|
||||
image: image/image
|
||||
|
||||
- name: build-and-push-sslip.io-nginx
|
||||
plan:
|
||||
- get: sslip.io-release
|
||||
- get: sslip.io
|
||||
trigger: true
|
||||
- task: build-task-image
|
||||
privileged: true
|
||||
@@ -95,32 +101,39 @@ jobs:
|
||||
source:
|
||||
repository: concourse/oci-build-task
|
||||
inputs:
|
||||
- name: sslip.io-release
|
||||
- name: sslip.io
|
||||
outputs:
|
||||
- name: image
|
||||
params:
|
||||
CONTEXT: sslip.io-release/k8s/
|
||||
DOCKERFILE: sslip.io-release/k8s/Dockerfile-sslip.io-nginx
|
||||
CONTEXT: sslip.io/k8s/
|
||||
DOCKERFILE: sslip.io/k8s/Dockerfile-sslip.io-nginx
|
||||
IMAGE_PLATFORM: linux/arm64,linux/amd64
|
||||
OUTPUT_OCI: true
|
||||
run:
|
||||
path: build
|
||||
- put: sslip.io-nginx
|
||||
params:
|
||||
image: image/image.tar
|
||||
image: image/image
|
||||
|
||||
# Delete this once there's a [Concourse
|
||||
# release](https://github.com/concourse/concourse/releases) (v7.9 ?) which has
|
||||
# a new version (> 1.5.1) of the registry-image resource that has the
|
||||
# multi-platform (ARM & AMD) code.
|
||||
|
||||
# Also, :%s/cunnie-registry-image/registry-image/
|
||||
resource_types:
|
||||
- name: cunnie-registry-image
|
||||
type: registry-image
|
||||
source:
|
||||
repository: cunnie/registry-image
|
||||
|
||||
resources:
|
||||
- name: sslip.io
|
||||
type: git
|
||||
icon: github
|
||||
source:
|
||||
uri: https://github.com/cunnie/sslip.io.git
|
||||
|
||||
- name: every-six-hours
|
||||
type: time
|
||||
icon: clock
|
||||
source: {interval: 6h}
|
||||
|
||||
# The repo with our sslip.io executable
|
||||
- name: sslip.io-release
|
||||
- name: sslip.io
|
||||
type: git
|
||||
icon: github
|
||||
source:
|
||||
@@ -129,7 +142,7 @@ resources:
|
||||
|
||||
# Where we will push the k-v.io nginx Docker image with HTML assets
|
||||
- name: k-v.io-nginx
|
||||
type: registry-image
|
||||
type: cunnie-registry-image
|
||||
icon: docker
|
||||
source:
|
||||
repository: cunnie/k-v.io-nginx
|
||||
@@ -139,7 +152,7 @@ resources:
|
||||
|
||||
# Where we will push the sslip.io nginx Docker image with HTML assets
|
||||
- name: sslip.io-nginx
|
||||
type: registry-image
|
||||
type: cunnie-registry-image
|
||||
icon: docker
|
||||
source:
|
||||
repository: cunnie/sslip.io-nginx
|
||||
@@ -149,10 +162,11 @@ resources:
|
||||
|
||||
# Where we will push the Docker image with the DNS server
|
||||
- name: sslip.io-dns-server
|
||||
type: registry-image
|
||||
type: cunnie-registry-image
|
||||
icon: docker
|
||||
source:
|
||||
repository: cunnie/sslip.io-dns-server
|
||||
username: cunnie
|
||||
password: ((docker_token))
|
||||
tag: latest
|
||||
|
||||
|
8
k8s/Dockerfile-delete-me
Normal file
8
k8s/Dockerfile-delete-me
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# cunnie/delete-me
|
||||
#
|
||||
# test Dockerfile
|
||||
#
|
||||
FROM alpine
|
||||
|
||||
LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
|
@@ -19,15 +19,15 @@
|
||||
# dig +short 127.0.0.1.example.com @localhost -p 3353
|
||||
# 127.0.0.1
|
||||
#
|
||||
FROM alpine AS sslip.io
|
||||
FROM fedora
|
||||
|
||||
LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
|
||||
|
||||
RUN apk update && apk add bind-tools
|
||||
RUN dnf install -y bind-utils
|
||||
|
||||
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2)
|
||||
RUN wget https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-$TARGETARCH \
|
||||
-O /usr/sbin/sslip.io-dns-server; \
|
||||
RUN curl https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-$TARGETARCH \
|
||||
-o /usr/sbin/sslip.io-dns-server; \
|
||||
chmod 755 /usr/sbin/sslip.io-dns-server
|
||||
|
||||
CMD ["/usr/sbin/sslip.io-dns-server"]
|
||||
|
Reference in New Issue
Block a user