forked from ahawkins/docker-thrift
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
- Loading branch information
Showing
10 changed files
with
93 additions
and
254 deletions.
There are no files selected for viewing
This file contains 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,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 | ||
|
This file contains 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,2 @@ | ||
ignored: | ||
- DL3008 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,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" ] |
This file contains 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