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
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
include:
- distro: centos-7
platform: linux/amd64
- distro: bionic
- distro: focal
platform: linux/amd64
- distro: aarch64
platform: linux/arm64
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
include:
- distro: centos-7
platform: linux/amd64
- distro: bionic
- distro: focal
platform: linux/amd64
- distro: aarch64
platform: linux/arm64
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
include:
- distro: centos-7
platform: linux/amd64
- distro: bionic
- distro: focal
platform: linux/amd64
- distro: aarch64
platform: linux/arm64
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GHCR_REPO := ghcr.io/nervosnetwork/ckb-docker-builder
RUST_VERSION := rust-$(shell sed -n "s/RUST_VERSION\s*=\s*'\(.*\)'$$/\1/p" gen-dockerfiles)
IMAGE_VERSION := ${RUST_VERSION}

bionic/Dockerfile: gen-dockerfiles templates/bionic.Dockerfile
focal/Dockerfile: gen-dockerfiles templates/focal.Dockerfile
python3 gen-dockerfiles

centos-7/Dockerfile: gen-dockerfiles templates/centos-7.Dockerfile
Expand All @@ -12,40 +12,40 @@ centos-7/Dockerfile: gen-dockerfiles templates/centos-7.Dockerfile
aarch64/Dockerfile: gen-dockerfiles templates/aarch64.Dockerfile
python3 gen-dockerfiles

build-all: build-bionic build-centos-7 build-aarch64
build-all: build-focal build-centos-7 build-aarch64

build-bionic: bionic/Dockerfile
docker build -f bionic/Dockerfile --tag ${DOCKERHUB_REPO}:bionic-${IMAGE_VERSION} .
build-focal: focal/Dockerfile
docker build -f focal/Dockerfile --tag ${DOCKERHUB_REPO}:focal-${IMAGE_VERSION} .

build-centos-7: centos-7/Dockerfile
docker build -f centos-7/Dockerfile --tag ${DOCKERHUB_REPO}:centos-7-${IMAGE_VERSION} .

build-aarch64: aarch64/Dockerfile
docker build -f aarch64/Dockerfile --tag ${DOCKERHUB_REPO}:aarch64-${IMAGE_VERSION} .

.PHONY: build-all build-bionic build-centos-7 build-aarch64
push-all: push-bionic push-centos-7 push-aarch64
.PHONY: build-all build-focal build-centos-7 build-aarch64
push-all: push-focal push-centos-7 push-aarch64

push-bionic: build-bionic
docker push ${DOCKERHUB_REPO}:bionic-${IMAGE_VERSION}
push-focal: build-focal
docker push ${DOCKERHUB_REPO}:focal-${IMAGE_VERSION}

push-centos-7: build-centos-7
docker push ${DOCKERHUB_REPO}:centos-7-${IMAGE_VERSION}

push-aarch64: build-aarch64
docker push ${DOCKERHUB_REPO}:aarch64-${IMAGE_VERSION}

.PHONY: push-all push-bionic push-centos-7 push-aarch64
.PHONY: push-all push-focal push-centos-7 push-aarch64

test-all: test-bionic test-centos-7
test-all: test-focal test-centos-7

sync-ckb:
if [ -d ckb ]; then git -C ckb pull; else git clone --depth 1 https://github.com/nervosnetwork/ckb.git; fi

test-bionic: sync-ckb
docker run --rm -it -w /ckb -v "$$(pwd)/ckb:/ckb" ${DOCKERHUB_REPO}:bionic-${IMAGE_VERSION} make prod
test-focal: sync-ckb
docker run --rm -it -w /ckb -v "$$(pwd)/ckb:/ckb" ${DOCKERHUB_REPO}:focal-${IMAGE_VERSION} make prod

test-centos-7: sync-ckb
docker run --rm -it -w /ckb -v "$$(pwd)/ckb:/ckb" ${DOCKERHUB_REPO}:centos-7-${IMAGE_VERSION} make prod

.PHONY: test-all test-bionic test-centos-7 sync-ckb
.PHONY: test-all test-focal test-centos-7 sync-ckb
4 changes: 2 additions & 2 deletions aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM arm64v8/ubuntu:20.04
FROM arm64v8/ubuntu:22.04

RUN set -eux; \
apt-get update; \
Expand Down Expand Up @@ -28,7 +28,7 @@ RUN set -eux; \
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c -; \
chmod +x rustup-init

ENV RUST_VERSION=1.85.0
ENV RUST_VERSION=1.91.0

RUN set -eux; \
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \
Expand Down
2 changes: 1 addition & 1 deletion centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN set -eux; \
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c -; \
chmod +x rustup-init

ENV RUST_VERSION=1.85.0
ENV RUST_VERSION=1.91.0

RUN set -eux; \
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \
Expand Down
4 changes: 2 additions & 2 deletions bionic/Dockerfile → focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

RUN set -eux; \
apt-get update; \
Expand Down Expand Up @@ -27,7 +27,7 @@ RUN set -eux; \
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c -; \
chmod +x rustup-init

ENV RUST_VERSION=1.85.0
ENV RUST_VERSION=1.91.0

RUN set -eux; \
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \
Expand Down
4 changes: 2 additions & 2 deletions gen-dockerfiles
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import os
from urllib import request

RUST_VERSION = '1.85.0'
RUST_VERSION = '1.91.0'
RUSTUP_VERSION = '1.27.1'

DISTRIBUTIONS = {
# Ubuntu
'bionic': 'x86_64-unknown-linux-gnu',
'focal': 'x86_64-unknown-linux-gnu',
# CentOS
'centos-7': 'x86_64-unknown-linux-gnu',
# Arch64
Expand Down
2 changes: 1 addition & 1 deletion templates/aarch64.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM arm64v8/ubuntu:20.04
FROM arm64v8/ubuntu:22.04

RUN set -eux; \
apt-get update; \
Expand Down
2 changes: 1 addition & 1 deletion templates/bionic.Dockerfile → templates/focal.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

RUN set -eux; \
apt-get update; \
Expand Down