-
Notifications
You must be signed in to change notification settings - Fork 2
Add service images #34
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
Show all changes
22 commits
Select commit
Hold shift + click to select a range
eff38b0
Handle more varied forms of `src` tree
lloeki 280277a
Add mirror images
lloeki c6c0fa0
Move to services
lloeki d7c618f
Add opencontainer labels
lloeki 1c342c7
Add aliasing information to targets
lloeki 5cd1a4d
Add platform information to targets
lloeki 1a8bd74
Build with inline cache
lloeki f0cc87f
Pin `SOURCE_DATE_EPOCH`
lloeki 79299f5
Add image push support via `PUSH`
lloeki 9318351
Ignore freshness via `FORCE`
lloeki 87e9020
Add platform selection via `PLATFORM`
lloeki 2d12948
Accept glob filtering in `docker:list` task
lloeki 579e8ce
Add full descriptions for `rake -D`
lloeki fe5d1ca
Add detailed target output via `docker:list:json`
lloeki 4c58301
Add image removal via `docker:remove`
lloeki 0fc5208
Build service images in CI
lloeki ad01502
Load only test rake task for Ruby < 2.3
lloeki 37b9fc3
Enable Ruby runtime
lloeki 3e52164
Hide misleading error messages on `satisfied?` checks
lloeki f9fa7b6
Default to all targets instead of none
lloeki 68ca76c
Update README
lloeki 2a85574
Use `LABEL=<value>` syntax
lloeki 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,102 @@ | ||
name: Build Services | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
push: | ||
description: Push images | ||
required: true | ||
type: boolean | ||
default: true | ||
workflow_call: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
REPO: datadog/images-rb | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- service: datadog/agent | ||
arch: ["x86_64", "aarch64"] | ||
- service: datadog/dd-apm-test-agent | ||
arch: ["x86_64", "aarch64"] | ||
- service: elasticsearch | ||
arch: ["x86_64", "aarch64"] | ||
- service: memcached | ||
arch: ["x86_64", "aarch64"] | ||
- service: mongo | ||
arch: ["x86_64", "aarch64"] | ||
- service: mysql | ||
arch: ["x86_64", "aarch64"] | ||
- service: opensearchproject/opensearch | ||
arch: ["x86_64", "aarch64"] | ||
- service: postgres | ||
arch: ["x86_64", "aarch64"] | ||
- service: redis | ||
arch: ["x86_64", "aarch64"] | ||
- service: starburstdata/presto | ||
arch: ["x86_64", "aarch64"] | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
packages: write | ||
name: Build (${{ matrix.service }}) | ||
steps: | ||
- name: Set up Docker | ||
uses: crazy-max/ghaction-setup-docker@635d07c09dc2b52072362e9bb37e7e789767106d | ||
with: | ||
daemon-config: | | ||
{ | ||
"features": { | ||
"containerd-snapshotter": true | ||
} | ||
} | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 | ||
with: | ||
ruby-version: '3.4' | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 2 | ||
- name: Bundle install | ||
run: | | ||
bundle install | ||
- name: Set variables | ||
id: vars | ||
run: | | ||
echo "DOCKER_PLATFORMS=$(echo ${{ join(matrix.arch) }} | tr ',' '\n' | sed 's/^/linux\//' | paste -s -d, -)" >> $GITHUB_OUTPUT | ||
|
||
# First, build image for x86_64 as it will fail fast | ||
# | ||
- name: Build single-arch image (x86_64) | ||
if: ${{ contains(matrix.arch, 'x86_64') }} | ||
run: | | ||
bundle exec rake docker:build['services/${{ matrix.service }}:*'] PLATFORM='linux/x86_64' | ||
|
||
# Then, build image for aarch64 which, being emulated under qemu, is slower | ||
# | ||
# Start by enabling qemu for aarch64 | ||
- name: Enable aarch64 emulation (x86_64) | ||
if: ${{ contains(matrix.arch, 'aarch64') }} | ||
run: | | ||
docker run --privileged --rm tonistiigi/binfmt --install arm64 | ||
- name: Build single-arch image (aarch64) | ||
if: ${{ contains(matrix.arch, 'aarch64') }} | ||
run: | | ||
bundle exec rake docker:build['services/${{ matrix.service }}:*'] PLATFORM='linux/aarch64' | ||
|
||
# Finally, assemble multi-arch image for a combined push to the registry | ||
# | ||
# This reruns docker build but layers are in the cache, so it's fast | ||
- name: Log in to the Container Registry | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin | ||
- name: Push release image (${{ join(matrix.arch, ', ') }}) | ||
if: ${{ inputs.push }} | ||
run: | | ||
bundle exec rake docker:build['services/${{ matrix.service }}:*'] PLATFORM='${{ steps.vars.outputs.DOCKER_PLATFORMS }}' PUSH=true |
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
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,3 @@ | ||
FROM datadog/agent | ||
lloeki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.12.0 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM elasticsearch:8.1.3 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM memcached:1.5-alpine | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM mongo:3.6 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,5 @@ | ||
FROM mysql:8.0 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb | ||
|
||
CMD ["--default-authentication-plugin=mysql_native_password"] |
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,3 @@ | ||
FROM opensearchproject/opensearch:2.8.0 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM postgres:9.6 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,3 @@ | ||
FROM redis:6.2 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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,4 @@ | ||
# append-tags: e.9 | ||
FROM starburstdata/presto:332-e.9 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/DataDog/images-rb |
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.