Merge remote-tracking branch 'origin/lance/gen-tools' into staging
This commit is contained in:
commit
abd6a93098
9 changed files with 398 additions and 0 deletions
45
packages/abseil-cpp/Containerfile
Normal file
45
packages/abseil-cpp/Containerfile
Normal file
|
@ -0,0 +1,45 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=20240116.2
|
||||
ENV SRC_HASH=733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc
|
||||
ENV SRC_FILE=${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/abseil/abseil-cpp/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/zlib . /
|
||||
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR abseil-cpp-${VERSION}
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-WMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DABSL_USE_EXTERNAL_GOOGLETEST=ON \
|
||||
-DABSL_PROPAGATE_CXX_STD=ON \
|
||||
-DABSL_FIND_GOOGLETEST=ON
|
||||
cmake --build build
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none DESTDIR="/rootfs" cmake --install build
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
36
packages/mockgen/Containerfile
Normal file
36
packages/mockgen/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=1.6.0
|
||||
ENV SRC_HASH=470174971c3a63361149a30f5b2d3a716a198afeb6cc71daa30712faa7293942
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/golang/mock/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR mock-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/mockgen ./mockgen
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/mockgen /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
45
packages/protobuf/Containerfile
Normal file
45
packages/protobuf/Containerfile
Normal file
|
@ -0,0 +1,45 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=26.1
|
||||
ENV SRC_HASH=4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/protocolbuffers/protobuf/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/zlib . /
|
||||
COPY --from=stagex/abseil-cpp . /
|
||||
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR protobuf-${VERSION}
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/ \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-Dprotobuf_BUILD_TESTS=OFF \
|
||||
-Dprotobuf_BUILD_LIBPROTOC=ON \
|
||||
-Dprotobuf_ABSL_PROVIDER="package" \
|
||||
-Dprotobuf_ALLOW_CCACHE=ON \
|
||||
-Dprotobuf_USE_EXTERNAL_GTEST=ON
|
||||
cmake --build build
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none DESTDIR="/rootfs" cmake --install build
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
36
packages/protoc-gen-go-grpc/Containerfile
Normal file
36
packages/protoc-gen-go-grpc/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=1.63.2
|
||||
ENV SRC_HASH=ffc7611e4989de79de4c17b015ff10db810b85f749b12520336314746e9d7095
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/grpc/grpc-go/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR grpc-go-${VERSION}/cmd/protoc-gen-go-grpc
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/protoc-gen-go-grpc ./
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/protoc-gen-go-grpc /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
36
packages/protoc-gen-go/Containerfile
Normal file
36
packages/protoc-gen-go/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=1.5.4
|
||||
ENV SRC_HASH=d75e6960ecfabaaa83a7261b1b630d24e9c63aca79615fb15bf33e11b62fd019
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/golang/protobuf/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR protobuf-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/protoc-gen-go ./protoc-gen-go
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/protoc-gen-go /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
36
packages/protoc-gen-grpc-gateway/Containerfile
Normal file
36
packages/protoc-gen-grpc-gateway/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=2.19.1
|
||||
ENV SRC_HASH=89d78abbe4aca77ce7823223945e852aec31c87a8c7aac084340ef9f53fd9637
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/grpc-ecosystem/grpc-gateway/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR grpc-gateway-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/protoc-gen-grpc-gateway ./protoc-gen-grpc-gateway
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/protoc-gen-grpc-gateway /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
36
packages/protoc-gen-openapiv2/Containerfile
Normal file
36
packages/protoc-gen-openapiv2/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=2.17.1
|
||||
ENV SRC_HASH=092bc95544d6089ccea00fb124a0a81eadf212bf06d61a4ba422ad331bf3c6da
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/grpc-ecosystem/grpc-gateway/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR grpc-gateway-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/protoc-gen-openapiv2 ./protoc-gen-openapiv2
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/protoc-gen-openapiv2 /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
36
packages/protoc-go-inject-tag/Containerfile
Normal file
36
packages/protoc-go-inject-tag/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=1.4.0
|
||||
ENV SRC_HASH=0ec154e2b8159b1e449a7d182accf925bdad3b084ba75b8a497bcc816e49f47d
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/favadi/protoc-go-inject-tag/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf v${VERSION}.tar.gz
|
||||
WORKDIR protoc-go-inject-tag-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV GOFLAGS=-trimpath
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/protoc-go-inject-tag .
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/protoc-go-inject-tag /rootfs/usr/bin/
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
|
@ -1,4 +1,20 @@
|
|||
|
||||
.PHONY: abseil-cpp
|
||||
abseil-cpp: out/abseil-cpp/index.json
|
||||
out/abseil-cpp/index.json: \
|
||||
packages/abseil-cpp/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/linux-headers/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,abseil-cpp)
|
||||
|
||||
.PHONY: argp-standalone
|
||||
argp-standalone: out/argp-standalone/index.json
|
||||
out/argp-standalone/index.json: \
|
||||
|
@ -1145,6 +1161,16 @@ out/meson/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,meson)
|
||||
|
||||
.PHONY: mockgen
|
||||
mockgen: out/mockgen/index.json
|
||||
out/mockgen/index.json: \
|
||||
packages/mockgen/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,mockgen)
|
||||
|
||||
.PHONY: mtools
|
||||
mtools: out/mtools/index.json
|
||||
out/mtools/index.json: \
|
||||
|
@ -1343,6 +1369,72 @@ out/postgresql/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,postgresql)
|
||||
|
||||
.PHONY: protobuf
|
||||
protobuf: out/protobuf/index.json
|
||||
out/protobuf/index.json: \
|
||||
packages/protobuf/Containerfile \
|
||||
out/abseil-cpp/index.json \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,protobuf)
|
||||
|
||||
.PHONY: protoc-gen-go
|
||||
protoc-gen-go: out/protoc-gen-go/index.json
|
||||
out/protoc-gen-go/index.json: \
|
||||
packages/protoc-gen-go/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,protoc-gen-go)
|
||||
|
||||
.PHONY: protoc-gen-go-grpc
|
||||
protoc-gen-go-grpc: out/protoc-gen-go-grpc/index.json
|
||||
out/protoc-gen-go-grpc/index.json: \
|
||||
packages/protoc-gen-go-grpc/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,protoc-gen-go-grpc)
|
||||
|
||||
.PHONY: protoc-gen-grpc-gateway
|
||||
protoc-gen-grpc-gateway: out/protoc-gen-grpc-gateway/index.json
|
||||
out/protoc-gen-grpc-gateway/index.json: \
|
||||
packages/protoc-gen-grpc-gateway/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,protoc-gen-grpc-gateway)
|
||||
|
||||
.PHONY: protoc-gen-openapiv2
|
||||
protoc-gen-openapiv2: out/protoc-gen-openapiv2/index.json
|
||||
out/protoc-gen-openapiv2/index.json: \
|
||||
packages/protoc-gen-openapiv2/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,protoc-gen-openapiv2)
|
||||
|
||||
.PHONY: protoc-go-inject-tag
|
||||
protoc-go-inject-tag: out/protoc-go-inject-tag/index.json
|
||||
out/protoc-go-inject-tag/index.json: \
|
||||
packages/protoc-go-inject-tag/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,protoc-go-inject-tag)
|
||||
|
||||
.PHONY: py-awscrt
|
||||
py-awscrt: out/py-awscrt/index.json
|
||||
out/py-awscrt/index.json: \
|
||||
|
|
Loading…
Reference in a new issue