Skip to content

Commit 9e78435

Browse files
committed
chore: sync local changes (arm64 nightly, cache, ENTRYPOINT, clang/g++)
1 parent e6ca36c commit 9e78435

File tree

3 files changed

+62
-31
lines changed

3 files changed

+62
-31
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ name: ci
33
on:
44
push:
55
branches:
6+
- main
67
- master
78
paths-ignore:
89
- '**/README.md'
910
tags:
1011
- '*'
12+
schedule:
13+
- cron: '0 3 * * 1'
1114
workflow_dispatch:
1215
inputs:
1316
push:
@@ -69,65 +72,89 @@ jobs:
6972
curl -fL "https://raw.githubusercontent.com/b4b4r07/httpstat/master/httpstat.sh" -o _dl/httpstat.sh
7073
7174
- name: Login to Docker Hub
72-
if: inputs.push == true || github.event_name == 'push'
75+
if: inputs.push == true || github.event_name == 'push' || github.event_name == 'schedule'
7376
uses: docker/login-action@v2
7477
with:
7578
username: ${{ secrets.DOCKERHUB_USERNAME }}
7679
password: ${{ secrets.DOCKERHUB_TOKEN }}
7780

7881
- name: Set up QEMU
79-
if: inputs.push == true || github.event_name == 'push'
82+
if: github.event_name == 'schedule'
8083
uses: docker/setup-qemu-action@v3
8184
with:
82-
platforms: linux/amd64
85+
platforms: linux/arm64
8386

8487
- name: Set up Docker Buildx
85-
if: inputs.push == true || github.event_name == 'push'
88+
if: inputs.push == true || github.event_name == 'push' || github.event_name == 'schedule'
8689
uses: docker/setup-buildx-action@v2
8790

8891
- name: Build (no push) via docker build (act)
8992
if: inputs.push != true && github.event_name != 'push' && env.ACT == 'true'
9093
run: |
9194
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 --load \
92-
-t curl-http3:${IMAGE_TAG} -t curl-http3:latest .
95+
-t curl-edge:${IMAGE_TAG} -t curl-edge:latest .
9396
9497
- name: Build (no push)
95-
if: inputs.push != true && github.event_name != 'push' && env.ACT != 'true'
98+
if: inputs.push != true && github.event_name != 'push' && github.event_name != 'schedule' && env.ACT != 'true'
9699
uses: docker/build-push-action@v4
97100
with:
98101
context: .
99102
push: false
100103
platforms: linux/amd64
101104
load: true
102105
tags: |
103-
curl-http3:${{ env.IMAGE_TAG }}
104-
curl-http3:latest
106+
curl-edge:${{ env.IMAGE_TAG }}
107+
curl-edge:latest
105108
106109
- name: Test curl -V
107110
if: inputs.push != true && github.event_name != 'push'
108-
run: docker run --rm curl-http3:${IMAGE_TAG} curl -V
111+
run: docker run --rm curl-edge:${IMAGE_TAG} -V
109112

110113
- name: Test HTTP/3 to Cloudflare
111114
if: inputs.push != true && github.event_name != 'push'
112115
run: |
113-
docker run --rm --network host curl-http3:${IMAGE_TAG} \
114-
curl -I --http3 https://cloudflare-quic.com/ || \
115-
docker run --rm --network host curl-http3:${IMAGE_TAG} \
116-
curl -I --http3 https://www.cloudflare.com/ --connect-timeout 10 || true
116+
docker run --rm --network host curl-edge:${IMAGE_TAG} \
117+
-I --http3 https://cloudflare-quic.com/ || \
118+
docker run --rm --network host curl-edge:${IMAGE_TAG} \
119+
-I --http3 https://www.cloudflare.com/ --connect-timeout 10 || true
117120
118121
- name: Test httpstat script
119122
if: inputs.push != true && github.event_name != 'push'
120123
run: |
121-
docker run --rm --network host curl-http3:${IMAGE_TAG} \
124+
docker run --rm --network host curl-edge:${IMAGE_TAG} \
122125
/opt/httpstat.sh -I --http3 https://cloudflare-quic.com/ || true
123126
124-
- name: Build and push
127+
- name: Build and push (push/dispatch, amd64 only)
125128
if: inputs.push == true || github.event_name == 'push'
126129
uses: docker/build-push-action@v4
127130
with:
128131
context: .
129132
push: true
130133
platforms: linux/amd64
134+
cache-from: type=gha
135+
cache-to: type=gha,mode=max
136+
tags: |
137+
getpagespeed/curl-edge:amd64-${{ env.IMAGE_TAG }}
138+
getpagespeed/curl-edge:latest-amd64
139+
140+
- name: Build and push (nightly, arm64 only)
141+
if: github.event_name == 'schedule'
142+
uses: docker/build-push-action@v4
143+
with:
144+
context: .
145+
push: true
146+
platforms: linux/arm64
147+
cache-from: type=gha
148+
cache-to: type=gha,mode=max
131149
tags: |
132-
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.GITHUB_REPOSITORY_NAME_PART }}:${{ env.IMAGE_TAG }}
133-
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.GITHUB_REPOSITORY_NAME_PART }}:latest
150+
getpagespeed/curl-edge:arm64-${{ env.IMAGE_TAG }}
151+
getpagespeed/curl-edge:latest-arm64
152+
153+
- name: Create multi-arch manifest (nightly)
154+
if: github.event_name == 'schedule'
155+
run: |
156+
docker buildx imagetools create \
157+
-t getpagespeed/curl-edge:${IMAGE_TAG} \
158+
-t getpagespeed/curl-edge:latest \
159+
getpagespeed/curl-edge:amd64-${IMAGE_TAG} \
160+
getpagespeed/curl-edge:arm64-${IMAGE_TAG}

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
FROM alpine:edge AS builder
22

3-
LABEL maintainer="Yury Muski <muski.yury@gmail.com>"
3+
LABEL maintainer="Danila Vershinin <[email protected].com>"
44

55
WORKDIR /opt
66

7-
RUN apk add --no-cache build-base git autoconf libpsl-dev libtool cmake go curl nghttp2-dev zlib-dev automake rustup && rustup-init -y -q
7+
RUN apk add --no-cache build-base git autoconf libpsl-dev libtool cmake go curl nghttp2-dev zlib-dev automake rustup clang lld ninja pkgconf python3 linux-headers && rustup-init -y -q
8+
9+
# Prefer clang toolchain for BoringSSL/quiche on all arches (including arm64)
10+
ENV CC=clang
11+
ENV CXX=g++
812

913
COPY _dl/quiche.tar.gz /opt/quiche.tar.gz
1014
COPY _dl/curl.tar.gz /opt/curl.tar.gz
@@ -13,7 +17,7 @@ RUN mkdir -p /opt/quiche-src && \
1317
tar -xzf /opt/quiche.tar.gz -C /opt/quiche-src --strip-components=1 && \
1418
rm /opt/quiche.tar.gz
1519
RUN cd /opt/quiche-src && \
16-
PATH="$HOME/.cargo/bin:$PATH" cargo build --package quiche --release --features ffi,pkg-config-meta,qlog && \
20+
RUST_BACKTRACE=1 PATH="$HOME/.cargo/bin:$PATH" cargo build -vv --package quiche --release --features ffi,pkg-config-meta,qlog --jobs $(nproc) && \
1721
mkdir -p quiche/deps/boringssl/src/lib && \
1822
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
1923

@@ -35,4 +39,4 @@ WORKDIR /opt
3539
COPY _dl/httpstat.sh /opt/httpstat.sh
3640
RUN chmod +x /opt/httpstat.sh
3741

38-
CMD ["curl"]
42+
ENTRYPOINT ["curl"]

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# curl-http3
2-
[![](https://img.shields.io/docker/pulls/ymuski/curl-http3?style=flat-square)](https://hub.docker.com/r/ymuski/curl-http3)
1+
# curl-edge
2+
[![](https://img.shields.io/docker/pulls/getpagespeed/curl-edge?style=flat-square)](https://hub.docker.com/r/getpagespeed/curl-edge)
33

4-
Docker image of `curl` compiled with `BoringSSL` and `quiche/0.17.2` for **HTTP3 support**, `httpstat` for visualization.
4+
Bleeding‑edge Docker image of `curl` with `BoringSSL` and `quiche` (HTTP/3), plus `httpstat` for visualization.
55

66
Link for [curl + http3 manual](https://github.com/curl/curl/blob/master/docs/HTTP3.md#quiche-version)
77

88
## Usage
99

10-
`docker run -it --rm ymuski/curl-http3 curl -V`
10+
`docker run -it --rm getpagespeed/curl-edge -V`
1111
```
1212
curl 8.1.2-DEV (x86_64-pc-linux-gnu) libcurl/8.1.2-DEV BoringSSL quiche/0.17.2
1313
Release-Date: [unreleased]
@@ -16,9 +16,9 @@ Features: alt-svc AsynchDNS HSTS HTTP3 HTTPS-proxy IPv6 Largefile NTLM NTLM_WB S
1616
```
1717

1818

19-
`docker run -it --rm ymuski/curl-http3 curl -IL https://blog.cloudflare.com --http3`
19+
`docker run -it --rm getpagespeed/curl-edge -IL https://blog.cloudflare.com --http3`
2020

21-
`docker run -it --rm ymuski/curl-http3 curl -IL https://yurets.pro --http3`
21+
`docker run -it --rm getpagespeed/curl-edge -IL https://yurets.pro --http3`
2222

2323
```
2424
@@ -39,19 +39,19 @@ alt-svc: h3=":443"; ma=86400
3939

4040
### httpstat support
4141

42-
`docker run -it --rm ymuski/curl-http3 ./httpstat.sh -ILv https://blog.cloudflare.com --http3`
42+
`docker run -it --rm getpagespeed/curl-edge ./httpstat.sh -ILv https://blog.cloudflare.com --http3`
4343

44-
`docker run -it --rm ymuski/curl-http3 ./httpstat.sh -ILv https://yurets.pro --http3`
44+
`docker run -it --rm getpagespeed/curl-edge ./httpstat.sh -ILv https://yurets.pro --http3`
4545

4646
![](httpstat.png?raw=true "HTTPSTAT H3")
4747

4848

4949
## Build
5050

5151
```
52-
docker buildx build --platform linux/amd64 -t ymuski/curl-http3:latest -t ymuski/curl-http3:8.1.2 . --push
52+
docker buildx build --platform linux/amd64 -t getpagespeed/curl-edge:latest -t getpagespeed/curl-edge:8.1.2 . --push
5353
5454
# quiche fails to compile for arm
55-
docker buildx build --platform linux/arm,linux/arm64,linux/amd64 -t ymuski/curl-http3:latest -t ymuski/curl-http3:8.1.2 . --push
55+
docker buildx build --platform linux/arm,linux/arm64,linux/amd64 -t getpagespeed/curl-edge:latest -t getpagespeed/curl-edge:8.1.2 . --push
5656
5757
```

0 commit comments

Comments
 (0)