Skip to content

Commit

Permalink
Bump thrift from 0.14.1 to 0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 committed Dec 28, 2023
1 parent a40b4dd commit 8f8dc47
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 254 deletions.
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 }}

- 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.

29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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
```

0 comments on commit 8f8dc47

Please sign in to comment.