-
Notifications
You must be signed in to change notification settings - Fork 4.1k
THRIFT-5000: Restore Docker Official Image packaging #3421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Docker Official Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| paths: | ||
| - 'docker/**' | ||
| - '.github/workflows/docker.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'docker/**' | ||
| - '.github/workflows/docker.yml' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| bashbrew: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | ||
| with: | ||
| go-version: stable | ||
| cache: false | ||
|
|
||
| - name: Install Bashbrew | ||
| run: | | ||
| set -eux | ||
| GOBIN="$PWD/docker/tmp/bin" go install github.com/docker-library/bashbrew/cmd/bashbrew@v0.1.14 | ||
| echo "$PWD/docker/tmp/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Validate Bashbrew manifest | ||
| run: | | ||
| set -eux | ||
| mkdir -p docker/tmp/bashbrew-library | ||
| (cd docker && GIT_COMMIT="$(git rev-parse HEAD)" ./generate-stackbrew-library.sh) > docker/tmp/bashbrew-library/thrift | ||
| BASHBREW_LIBRARY="$PWD/docker/tmp/bashbrew-library" bashbrew cat thrift >/dev/null | ||
| BASHBREW_LIBRARY="$PWD/docker/tmp/bashbrew-library" bashbrew list --build-order --uniq thrift >/dev/null | ||
|
|
||
| docker: | ||
| name: Docker (${{ matrix.platform }}) | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - platform: linux/amd64 | ||
| runner: ubuntu-22.04 | ||
| - platform: linux/arm64 | ||
| runner: ubuntu-24.04-arm | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Verify Docker Buildx | ||
| run: docker buildx version | ||
|
|
||
| - name: Build and test Docker images | ||
| timeout-minutes: 90 | ||
| run: docker/test.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| FROM debian:trixie AS builder | ||
|
|
||
| ARG THRIFT_VERSION=0.22.0 | ||
| ARG THRIFT_SOURCE_URL=https://archive.apache.org/dist/thrift/0.22.0/thrift-0.22.0.tar.gz | ||
| ARG THRIFT_SOURCE_SHA256=794a0e455787960d9f27ab92c38e34da27e8deeda7a5db0e59dc64a00df8a1e5 | ||
| ARG THRIFT_SOURCE_SIGNER=8CD87F186F06E958EFCA963D76BD340FC4B75865 | ||
|
|
||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends \ | ||
| bison \ | ||
| ca-certificates \ | ||
| cmake \ | ||
| curl \ | ||
| flex \ | ||
| g++ \ | ||
| gnupg \ | ||
| make \ | ||
| ; \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /usr/src | ||
|
|
||
| RUN set -eux; \ | ||
| curl -fsSL -o thrift.tar.gz "$THRIFT_SOURCE_URL"; \ | ||
| curl -fsSL -o thrift.tar.gz.asc "$THRIFT_SOURCE_URL.asc"; \ | ||
| curl -fsSL -o thrift-KEYS https://downloads.apache.org/thrift/KEYS; \ | ||
| echo "$THRIFT_SOURCE_SHA256 *thrift.tar.gz" | sha256sum -c -; \ | ||
| export GNUPGHOME="$(mktemp -d)"; \ | ||
| gpg --batch --import thrift-KEYS; \ | ||
| gpg --batch --status-fd 1 --verify thrift.tar.gz.asc thrift.tar.gz > gpg.status; \ | ||
| grep -F "[GNUPG:] VALIDSIG $THRIFT_SOURCE_SIGNER " gpg.status; \ | ||
| gpgconf --kill all; \ | ||
| rm -rf "$GNUPGHOME"; \ | ||
| mkdir thrift; \ | ||
| tar -xzf thrift.tar.gz -C thrift --strip-components=1; \ | ||
| rm thrift.tar.gz thrift.tar.gz.asc thrift-KEYS gpg.status | ||
|
|
||
| RUN set -eux; \ | ||
| cmake -S thrift -B build \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBUILD_COMPILER=ON \ | ||
| -DBUILD_LIBRARIES=OFF \ | ||
| -DBUILD_TESTING=OFF \ | ||
| -DBUILD_TUTORIALS=OFF; \ | ||
| cmake --build build --target thrift-compiler -j "$(nproc)"; \ | ||
| cmake --install build --prefix /opt/thrift | ||
|
|
||
| FROM debian:trixie-slim | ||
|
|
||
| ARG THRIFT_VERSION=0.22.0 | ||
|
|
||
| LABEL org.opencontainers.image.title="Apache Thrift Compiler" \ | ||
| org.opencontainers.image.version="$THRIFT_VERSION" \ | ||
| org.opencontainers.image.source="https://github.com/apache/thrift" \ | ||
| org.opencontainers.image.url="https://thrift.apache.org/" \ | ||
| org.opencontainers.image.licenses="Apache-2.0" | ||
|
|
||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends libstdc++6; \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY --from=builder /opt/thrift/bin/thrift /usr/local/bin/thrift | ||
| COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | ||
| COPY tests/smoke.thrift /tmp/smoke.thrift | ||
|
|
||
| RUN set -eux; \ | ||
| thrift --version | grep -F "$THRIFT_VERSION"; \ | ||
| mkdir -p /tmp/smoke-out; \ | ||
| thrift --gen json -o /tmp/smoke-out /tmp/smoke.thrift; \ | ||
| find /tmp/smoke-out -type f | grep -q .; \ | ||
| rm -rf /tmp/smoke.thrift /tmp/smoke-out | ||
|
|
||
| WORKDIR /data | ||
|
|
||
| ENTRYPOINT ["docker-entrypoint.sh"] | ||
| CMD ["thrift"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| FROM alpine:3.23 AS builder | ||
|
|
||
| ARG THRIFT_VERSION=0.22.0 | ||
| ARG THRIFT_SOURCE_URL=https://archive.apache.org/dist/thrift/0.22.0/thrift-0.22.0.tar.gz | ||
| ARG THRIFT_SOURCE_SHA256=794a0e455787960d9f27ab92c38e34da27e8deeda7a5db0e59dc64a00df8a1e5 | ||
| ARG THRIFT_SOURCE_SIGNER=8CD87F186F06E958EFCA963D76BD340FC4B75865 | ||
|
|
||
| RUN set -eux; \ | ||
| apk add --no-cache \ | ||
| bison \ | ||
| build-base \ | ||
| ca-certificates \ | ||
| cmake \ | ||
| curl \ | ||
| flex \ | ||
| gnupg \ | ||
| ; \ | ||
| update-ca-certificates | ||
|
|
||
| WORKDIR /usr/src | ||
|
|
||
| RUN set -eux; \ | ||
| curl -fsSL -o thrift.tar.gz "$THRIFT_SOURCE_URL"; \ | ||
| curl -fsSL -o thrift.tar.gz.asc "$THRIFT_SOURCE_URL.asc"; \ | ||
| curl -fsSL -o thrift-KEYS https://downloads.apache.org/thrift/KEYS; \ | ||
| echo "$THRIFT_SOURCE_SHA256 *thrift.tar.gz" | sha256sum -c -; \ | ||
| export GNUPGHOME="$(mktemp -d)"; \ | ||
| gpg --batch --import thrift-KEYS; \ | ||
| gpg --batch --status-fd 1 --verify thrift.tar.gz.asc thrift.tar.gz > gpg.status; \ | ||
| grep -F "[GNUPG:] VALIDSIG $THRIFT_SOURCE_SIGNER " gpg.status; \ | ||
| gpgconf --kill all; \ | ||
| rm -rf "$GNUPGHOME"; \ | ||
| mkdir thrift; \ | ||
| tar -xzf thrift.tar.gz -C thrift --strip-components=1; \ | ||
| rm thrift.tar.gz thrift.tar.gz.asc thrift-KEYS gpg.status | ||
|
|
||
| RUN set -eux; \ | ||
| cmake -S thrift -B build \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBUILD_COMPILER=ON \ | ||
| -DBUILD_LIBRARIES=OFF \ | ||
| -DBUILD_TESTING=OFF \ | ||
| -DBUILD_TUTORIALS=OFF; \ | ||
| cmake --build build --target thrift-compiler -j "$(nproc)"; \ | ||
| cmake --install build --prefix /opt/thrift | ||
|
|
||
| FROM alpine:3.23 | ||
|
|
||
| ARG THRIFT_VERSION=0.22.0 | ||
|
|
||
| LABEL org.opencontainers.image.title="Apache Thrift Compiler" \ | ||
| org.opencontainers.image.version="$THRIFT_VERSION" \ | ||
| org.opencontainers.image.source="https://github.com/apache/thrift" \ | ||
| org.opencontainers.image.url="https://thrift.apache.org/" \ | ||
| org.opencontainers.image.licenses="Apache-2.0" | ||
|
|
||
| RUN set -eux; \ | ||
| apk add --no-cache libstdc++ | ||
|
|
||
| COPY --from=builder /opt/thrift/bin/thrift /usr/local/bin/thrift | ||
| COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | ||
| COPY tests/smoke.thrift /tmp/smoke.thrift | ||
|
|
||
| RUN set -eux; \ | ||
| thrift --version | grep -F "$THRIFT_VERSION"; \ | ||
| mkdir -p /tmp/smoke-out; \ | ||
| thrift --gen json -o /tmp/smoke-out /tmp/smoke.thrift; \ | ||
| find /tmp/smoke-out -type f | grep -q .; \ | ||
| rm -rf /tmp/smoke.thrift /tmp/smoke-out | ||
|
|
||
| WORKDIR /data | ||
|
|
||
| ENTRYPOINT ["docker-entrypoint.sh"] | ||
| CMD ["thrift"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| FROM debian:trixie AS builder | ||
|
|
||
| ARG THRIFT_VERSION=0.23.0 | ||
| ARG THRIFT_SOURCE_URL=https://archive.apache.org/dist/thrift/0.23.0/thrift-0.23.0.tar.gz | ||
| ARG THRIFT_SOURCE_SHA256=1859d932d2ae1f13d16c5a196931208c116310a5ff50f2bfd11d3db03be8f46f | ||
| ARG THRIFT_SOURCE_SIGNER=8CD87F186F06E958EFCA963D76BD340FC4B75865 | ||
|
|
||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends \ | ||
| bison \ | ||
| ca-certificates \ | ||
| cmake \ | ||
| curl \ | ||
| flex \ | ||
| g++ \ | ||
| gnupg \ | ||
| make \ | ||
| ; \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /usr/src | ||
|
|
||
| RUN set -eux; \ | ||
| curl -fsSL -o thrift.tar.gz "$THRIFT_SOURCE_URL"; \ | ||
| curl -fsSL -o thrift.tar.gz.asc "$THRIFT_SOURCE_URL.asc"; \ | ||
| curl -fsSL -o thrift-KEYS https://downloads.apache.org/thrift/KEYS; \ | ||
| echo "$THRIFT_SOURCE_SHA256 *thrift.tar.gz" | sha256sum -c -; \ | ||
| export GNUPGHOME="$(mktemp -d)"; \ | ||
| gpg --batch --import thrift-KEYS; \ | ||
| gpg --batch --status-fd 1 --verify thrift.tar.gz.asc thrift.tar.gz > gpg.status; \ | ||
| grep -F "[GNUPG:] VALIDSIG $THRIFT_SOURCE_SIGNER " gpg.status; \ | ||
| gpgconf --kill all; \ | ||
| rm -rf "$GNUPGHOME"; \ | ||
| mkdir thrift; \ | ||
| tar -xzf thrift.tar.gz -C thrift --strip-components=1; \ | ||
| rm thrift.tar.gz thrift.tar.gz.asc thrift-KEYS gpg.status | ||
|
|
||
| RUN set -eux; \ | ||
| cmake -S thrift -B build \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBUILD_COMPILER=ON \ | ||
| -DBUILD_LIBRARIES=OFF \ | ||
| -DBUILD_TESTING=OFF \ | ||
| -DBUILD_TUTORIALS=OFF; \ | ||
| cmake --build build --target thrift-compiler -j "$(nproc)"; \ | ||
| cmake --install build --prefix /opt/thrift | ||
|
|
||
| FROM debian:trixie-slim | ||
|
|
||
| ARG THRIFT_VERSION=0.23.0 | ||
|
|
||
| LABEL org.opencontainers.image.title="Apache Thrift Compiler" \ | ||
| org.opencontainers.image.version="$THRIFT_VERSION" \ | ||
| org.opencontainers.image.source="https://github.com/apache/thrift" \ | ||
| org.opencontainers.image.url="https://thrift.apache.org/" \ | ||
| org.opencontainers.image.licenses="Apache-2.0" | ||
|
|
||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends libstdc++6; \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY --from=builder /opt/thrift/bin/thrift /usr/local/bin/thrift | ||
| COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | ||
| COPY tests/smoke.thrift /tmp/smoke.thrift | ||
|
|
||
| RUN set -eux; \ | ||
| thrift --version | grep -F "$THRIFT_VERSION"; \ | ||
| mkdir -p /tmp/smoke-out; \ | ||
| thrift --gen json -o /tmp/smoke-out /tmp/smoke.thrift; \ | ||
| find /tmp/smoke-out -type f | grep -q .; \ | ||
| rm -rf /tmp/smoke.thrift /tmp/smoke-out | ||
|
|
||
| WORKDIR /data | ||
|
|
||
| ENTRYPOINT ["docker-entrypoint.sh"] | ||
| CMD ["thrift"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.