Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pipeline {
}
axis {
name 'GO_FOLDER'
values 'go1.14', 'go1.15', 'go1.16'
values 'go1.16'
}
axis {
name 'PLATFORM'
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ The base image used is Debian 9 (stretch) unless otherwise specified.
## Build Tags

- `1.10.8-main`, `1.11.13-main`, `1.12.12-main`, `1.13.12-main`, `1.14.15-main`, `1.15.10-main`, `1.16.4-main` - linux/{amd64,386} and windows/{amd64,386}
- `1.10.8-arm`, `1.11.13-arm`, `1.12.12-arm`, `1.13.12-arm`, `1.14.15-arm`, `1.15.10-arm`, `1.16.4-arm` - linux/{armv5,armv6,armv7,arm64}
- `1.10.8-arm`, `1.11.13-arm`, `1.12.12-arm`, `1.13.12-arm`, `1.14.15-arm`, `1.15.10-arm`
- linux/{armv5,armv6,armv7,arm64}
- `1.16.4-arm` - linux/{arm64}
- `1.16.4-armel` - linux/{armv5,armv6}
- `1.16.4-armhf` - linux/{armv7}
- `1.10.8-darwin`, `1.11.13-darwin`, `1.12.12-darwin`, `1.13.12-darwin`, `1.14.15-darwin`, `1.16.4-darwin` - darwin/{386}
- `1.10.8-darwin`, `1.11.13-darwin`, `1.12.12-darwin`, `1.13.12-darwin`, `1.14.15-darwin`, `1.15.10-darwin`, `1.16.4-darwin` - darwin/{amd64}
- `1.10.8-ppc`, `1.11.13-ppc`, `1.12.12-ppc`, `1.13.12-ppc`, `1.14.15-ppc`, `1.15.10-ppc`, `1.16.4-ppc` - linux/{ppc64,ppc64le}
- `1.10.8-mips`, `1.11.13-mips`, `1.12.12-mips`, `1.13.12-mips`, `1.14.15-mips`, `1.15.10-mips`, `1.16.4-mips` - linux/{mips,mipsle,mips64,mips64le}
- `1.10.8-mips`, `1.11.13-mips`, `1.12.12-mips`, `1.13.12-mips`, `1.14.15-mips`, `1.15.10-mips` - linux/{mips,mipsle,mips64,mips64le}
- `1.16.4-mips` - linux/{mips64,mips64le}
- `1.16.4-mips32` - linux/{mips,mipsle}
- `1.10.8-s390x`, `1.11.13-s390x`, `1.12.12-s390`, `1.13.12-s390`, `1.14.15-s390`, `1.15.10-s390`, `1.16.4-s390` - linux/s390x
- `1.10.8-main-debian7`, `1.11.13-main-debian7`, `1.12.12-debian7`, `1.13.12-debian7`, `1.14.15-debian7`, `1.15.10-debian7`, `1.16.4-debian7` - linux/{amd64,386} and windows/{amd64,386} (Debian 7
uses glibc 2.13 so the resulting binaries (if dynamically linked) have greater
Expand Down
2 changes: 1 addition & 1 deletion go1.16/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGES := base main darwin arm mips ppc s390x
IMAGES := base main darwin arm armhf armel mips mips32 ppc s390x
ARM_IMAGES := base-arm

build:
Expand Down
2 changes: 1 addition & 1 deletion go1.16/Makefile.debian10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGES := base main darwin
IMAGES := base arm armhf armel mips mips32 ppc s390x darwin main
DEBIAN_VERSION := 10
TAG_EXTENSION := -debian10

Expand Down
2 changes: 1 addition & 1 deletion go1.16/Makefile.debian9
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGES := base main arm darwin mips ppc s390x
IMAGES := base main darwin arm armhf armel mips mips32 ppc s390x
ARM_IMAGES := base-arm
DEBIAN_VERSION := 9
TAG_EXTENSION := -debian9
Expand Down
56 changes: 35 additions & 21 deletions go1.16/arm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,50 @@ ARG VERSION
ARG TAG_EXTENSION=''
FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-base${TAG_EXTENSION}

RUN \
dpkg --add-architecture arm64 \
&& apt-get update -qq \
&& apt-get install -qq -y \
--no-install-recommends \
--allow-unauthenticated \
RUN dpkg --add-architecture arm64 \
&& apt update -y --no-install-recommends \
&& apt upgrade -y --no-install-recommends \
&& apt full-upgrade -y --no-install-recommends \
&& apt install -qq -y --no-install-recommends \
crossbuild-essential-arm64 \
crossbuild-essential-armel \
crossbuild-essential-armhf \
linux-libc-dev-arm64-cross \
linux-libc-dev-armel-cross \
linux-libc-dev-armhf-cross \
librpm-dev:arm64 \
linux-libc-dev-arm64-cross

RUN apt install -qq -y \
libc-dev:arm64 \
libpopt-dev:arm64 \
linux-libc-dev:arm64 \
libxml2-dev:arm64 \
libxml2:arm64 \
libicu-dev:arm64 \
libicu57:arm64 \
icu-devtools:arm64 \
libsystemd-dev:arm64 \
librpm3:arm64 \
linux-libc-dev:arm64

{{if eq .DEBIAN_VERSION "9"}}
# librpm-dev
RUN apt install -y \
librpm-dev:arm64 \
librpm3:arm64 \
librpmio3:arm64 \
librpmbuild3:arm64 \
librpmsign3:arm64 \
libxml2-dev:arm64 \
libsqlite3-dev:arm64 \
libnss3:arm64 \
libsqlite3-0:arm64 \
&& rm -rf /var/lib/apt/lists/*
libxml2:arm64 \
libsqlite3-0:arm64

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:arm64 libsystemd0:arm64 liblz4-1:arm64
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
# librpm-dev
RUN apt install -y \
librpm-dev:arm64

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:arm64
{{ end }}

RUN rm -rf /var/lib/apt/lists/*

COPY rootfs /

Expand Down
11 changes: 0 additions & 11 deletions go1.16/arm/rootfs/compilers.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---

linux:
armv7:
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
armv6:
# Using debian armel for ARMv6.
# This is the same as ARMv5 so it will use softfp instead of hardfp.
CC: arm-linux-gnueabi-gcc
CXX: arm-linux-gnueabi-g++
armv5:
CC: arm-linux-gnueabi-gcc
CXX: arm-linux-gnueabi-g++
arm64:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
1 change: 1 addition & 0 deletions go1.16/armel/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Makefile
70 changes: 70 additions & 0 deletions go1.16/armel/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ARG REPOSITORY
ARG VERSION
ARG TAG_EXTENSION=''
FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-base${TAG_EXTENSION}

RUN dpkg --add-architecture armel \
&& apt update -y --no-install-recommends \
&& apt upgrade -y --no-install-recommends \
&& apt full-upgrade -y --no-install-recommends \
&& apt install -qq -y --no-install-recommends \
crossbuild-essential-armel \
linux-libc-dev-armel-cross

RUN apt install -qq -y \
libc-dev:armel \
libpopt-dev:armel \
linux-libc-dev:armel

{{if eq .DEBIAN_VERSION "9"}}
# librpm-dev
RUN apt install -y \
librpm-dev:armel \
librpm3:armel \
librpmio3:armel \
librpmbuild3:armel \
librpmsign3:armel \
libxml2-dev:armel \
libsqlite3-dev:armel \
libnss3:armel \
libsqlite3-0:armel \
libxml2:armel \
libsqlite3-0:armel

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:armel libsystemd0:armel liblz4-1:armel
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
# librpm-dev
RUN apt install -y \
librpm-dev:armel

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:armel
{{ end }}

RUN rm -rf /var/lib/apt/lists/*

COPY rootfs /

# Basic test
RUN cd / \
&& arm-linux-gnueabi-gcc helloWorld.c -o helloWorld \
&& file helloWorld \
&& readelf -h helloWorld \
&& file helloWorld | cut -d "," -f 3 | grep -c 'EABI'\
&& rm helloWorld.c helloWorld

# Build-time metadata as defined at http://label-schema.org.
ARG BUILD_DATE
ARG IMAGE
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0"
1 change: 1 addition & 0 deletions go1.16/armel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../Makefile.common
11 changes: 11 additions & 0 deletions go1.16/armel/rootfs/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

linux:
armv6:
# Using debian armel for ARMv6.
# This is the same as ARMv5 so it will use softfp instead of hardfp.
CC: arm-linux-gnueabi-gcc
CXX: arm-linux-gnueabi-g++
armv5:
CC: arm-linux-gnueabi-gcc
CXX: arm-linux-gnueabi-g++
5 changes: 5 additions & 0 deletions go1.16/armel/rootfs/helloWorld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
1 change: 1 addition & 0 deletions go1.16/armhf/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Makefile
70 changes: 70 additions & 0 deletions go1.16/armhf/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ARG REPOSITORY
ARG VERSION
ARG TAG_EXTENSION=''
FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-base${TAG_EXTENSION}

RUN dpkg --add-architecture armhf \
&& apt update -y --no-install-recommends \
&& apt upgrade -y --no-install-recommends \
&& apt full-upgrade -y --no-install-recommends \
&& apt install -qq -y --no-install-recommends \
crossbuild-essential-armhf \
linux-libc-dev-armhf-cross

RUN apt install -qq -y \
libc-dev:armhf \
libpopt-dev:armhf \
linux-libc-dev:armhf

{{if eq .DEBIAN_VERSION "9"}}
# librpm-dev
RUN apt install -y \
librpm-dev:armhf \
librpm3:armhf \
librpmio3:armhf \
librpmbuild3:armhf \
librpmsign3:armhf \
libxml2-dev:armhf \
libsqlite3-dev:armhf \
libnss3:armhf \
libsqlite3-0:armhf \
libxml2:armhf \
libsqlite3-0:armhf

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:armhf libsystemd0:armhf liblz4-1:armhf
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
# librpm-dev
RUN apt install -y \
librpm-dev:armhf

# libsystemd-dev
RUN apt install -y \
libsystemd-dev:armhf
{{ end }}

RUN rm -rf /var/lib/apt/lists/*

COPY rootfs /

# Basic test
RUN cd / \
&& arm-linux-gnueabihf-gcc helloWorld.c -o helloWorld \
&& file helloWorld \
&& readelf -h helloWorld \
&& file helloWorld | cut -d "," -f 5 | grep -c 'armhf.so'\
&& rm helloWorld.c helloWorld

# Build-time metadata as defined at http://label-schema.org.
ARG BUILD_DATE
ARG IMAGE
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0"
1 change: 1 addition & 0 deletions go1.16/armhf/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../Makefile.common
6 changes: 6 additions & 0 deletions go1.16/armhf/rootfs/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

linux:
armv7:
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
5 changes: 5 additions & 0 deletions go1.16/armhf/rootfs/helloWorld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
8 changes: 4 additions & 4 deletions go1.16/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ARG DEBIAN_VERSION
# Replace sources.list in order to use archive.debian.org.
COPY sources-debian${DEBIAN_VERSION}.list /etc/apt/sources.list

RUN \
apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get dist-upgrade -y \
&& apt-get install -qq -y --no-install-recommends --allow-unauthenticated \
RUN apt-get -o Acquire::Check-Valid-Until=false update -y --no-install-recommends --allow-unauthenticated \
&& apt-get upgrade -y --no-install-recommends --allow-unauthenticated \
&& apt-get dist-upgrade -y --no-install-recommends --allow-unauthenticated \
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
build-essential \
ca-certificates \
curl \
Expand Down
3 changes: 2 additions & 1 deletion go1.16/base/sources-debian10.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# see https://wiki.debian.org/CrossToolchains
deb http://deb.debian.org/debian buster main
deb [arch=amd64,i386] http://security.debian.org/debian-security buster/updates main
deb http://security.debian.org/debian-security buster/updates main
2 changes: 2 additions & 0 deletions go1.16/base/sources-debian7.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# see https://wiki.debian.org/CrossToolchains
# https://bugs.launchpad.net/torios/+bug/1835529
deb http://archive.debian.org/debian wheezy main
deb http://archive.debian.org/debian-security wheezy/updates main
2 changes: 2 additions & 0 deletions go1.16/base/sources-debian8.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# see https://wiki.debian.org/CrossToolchains
# https://bugs.launchpad.net/torios/+bug/1835529
deb http://archive.debian.org/debian jessie main
deb [arch=amd64,i386] http://security.debian.org/debian-security jessie/updates main
3 changes: 2 additions & 1 deletion go1.16/base/sources-debian9.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# see https://wiki.debian.org/CrossToolchains
deb http://deb.debian.org/debian stretch main
deb [arch=amd64,i386] http://security.debian.org/debian-security stretch/updates main
deb http://security.debian.org/debian-security stretch/updates main
Loading