Skip to content
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

Bump thrift from 0.14.1 to 0.19.0 #3

Merged
merged 1 commit into from
Jan 3, 2024
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
60 changes: 60 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docker Image
on:
push:
tags:
- '**'
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
verbose: true

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
with:
install: true

- name: Extract tags/labels from Git
id: docker_meta
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0
with:
images: jaegertracing/thrift
# The 'tags:' section defines how the Docker image will be tagged:
# - pushes to master branch will be published as 'latest'
# - pushes tagged with semver will be published as that version (without 'v')
# - other tags can be used as is
# Documentation: https://github.com/docker/metadata-action#tags-input
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=semver,pattern={{version}}
type=ref,event=tag

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were missing so the workflow failed. I just added them. Can you add on: workflow_dispatch: to the workflow triggers?


- name: Build and maybe push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

2 changes: 2 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignored:
- DL3008
41 changes: 0 additions & 41 deletions 0.10/Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions 0.11/Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions 0.12/Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions 0.13/Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions 0.14/Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions 0.9/Dockerfile

This file was deleted.

31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:22.04

ENV THRIFT_VERSION v0.19.0

ENV BUILD_DEPS "automake bison curl flex g++ libboost-all-dev libevent-dev libssl-dev libtool make pkg-config"

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${BUILD_DEPS} \
&& rm -rf /var/lib/apt/lists/* \
&& curl -k -sSL "https://github.com/apache/thrift/archive/${THRIFT_VERSION}.tar.gz" -o thrift.tar.gz \
&& mkdir -p /usr/src/thrift \
&& tar zxf thrift.tar.gz -C /usr/src/thrift --strip-components=1 \
&& rm thrift.tar.gz

WORKDIR /usr/src/thrift

RUN ./bootstrap.sh \
&& ./configure --disable-libs \
&& make \
&& make install

WORKDIR /

RUN rm -rf /usr/src/thrift \
&& apt-get purge -y --auto-remove ${BUILD_DEPS} \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*

CMD [ "thrift" ]
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Read more about [Thrift](https://thrift.apache.org).

This is image is intended to run as an executable. Files are provided
by mounting a directory. Here's an example of compiling
`service.thrift` to ruby.
`service.thrift` to golang.

docker run -v "$(pwd):/data" jaegertracing/thrift thrift --gen rb /data/service.thrift
docker run -v "$(pwd):/data" jaegertracing/thrift thrift --gen go /data/service.thrift

# Language Specific Installations

Expand All @@ -28,10 +28,3 @@ additional things to install besides the thrift compiler. They are
listed below:

* Go - `go fmt` from go 1.4

# Build and publish

```
docker build -f 0.14/Dockerfile -t jaegertracing/thrift:0.14 .
docker push jaegertracing/thrift:0.14
```