Comments (4)
nomenclature
A "multi-platform image" is actually a separate Docker image for each platform (each with its own SHA identifier and manifest), and a "manifest list" that is metadata about the included images. This manifest list is the thing that is tagged for reference.
For example, look at the current alpine:latest
image:
% docker buildx imagetools inspect alpine:latest
Name: docker.io/library/alpine:latest
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest: sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd
Manifests:
Name: docker.io/library/alpine:latest@sha256:216266c86fc4dcef5619930bd394245824c2af52fd21ba7c6fa0e618657d4c3b
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/amd64
Name: docker.io/library/alpine:latest@sha256:4a6ffef76277d8c1d912ad489e0c09ddc09fdf7aefae51750a33dc47478c0cc0
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm/v6
Name: docker.io/library/alpine:latest@sha256:1c3b93ed450e26eac89b471d6d140e2f99488f489739b8b8ea5e8202dd086f82
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm64/v8
...
building a multi-platform image locally
(Here are some notes on creating a multi-platform image for apm-agent-nodejs locally on macOS. This is for educational purposes. The real answer will be to make the GH workflow changes to release.yml
.)
tl;dr:
./dev-utils/make-distribution.sh # script that creates "./build/dist/nodejs/"
docker buildx create --name builder --driver=docker-container
docker login
docker buildx build --builder builder --build-arg AGENT_DIR=/build/dist/nodejs --platform linux/amd64,linux/arm64 --push -t $IMAGE_NAME:$IMAGE_TAG .
The Docker docs article https://docs.docker.com/build/building/multi-platform/ shows how to use docker buildx build ...
to create multi-platform images. In my case I'm using Docker Desktop which defaults to a "docker" builder that does not support building multi-platform. There are options for other builds. I'm using the docker-container
builder option, because that appears to be the option suggested to be used with the docker/build-push-action
GH action that we'll eventually be using in CI.
First you need to create a builder. I named it "builder":
docker buildx create --name builder --driver=docker-container
Then use it with the --builder BUILDER-NAME
option.
The --platform PLATFORMS
option specifies the platforms to include.
docker login # cat ~/.docker/config.json
docker buildx build --builder builder --build-arg AGENT_DIR=/build/dist/nodejs --platform linux/amd64,linux/arm64 --push -t trentm/enode:5 .
Note that to use the multi-platform image, it needs to be published to a registry. You cannot just have it in your local Docker (e.g. the list of docker images
). For my local testing I published to trentm/enode:5
for playing. You can see it at: https://hub.docker.com/repository/docker/trentm/enode/tags
using in GH Actions
My understanding, from https://docs.docker.com/build/ci/github-actions/multi-platform/, is that we will just need:
# add this step to create the "builder"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64 # <--- add this
push: true
tags: user/app:latest
from apm-agent-nodejs.
note to self: enode10
from apm-agent-nodejs.
@trentm any tentative date? when this will go live?
from apm-agent-nodejs.
@heisGarvit Sorry for the delay. I hope to have a fix for this and then a release later this week.
from apm-agent-nodejs.
Related Issues (20)
- opentelemetry-bridge should use the ELASTIC_APM_API_KEY HOT 1
- Any plans to support hyper-express please? HOT 4
- Support for Azure OpenAI
- nightly test with Node.js v23 failing in `elasticsearch` module
- add support for synchronous gauge to OTel Bridge metrics support
- Is there any plan to add a way to customize trace.id ? HOT 2
- Nested labels are indexed as `[object Object]` HOT 1
- "active" config not being respected when the agent is started with -r or top level import HOT 3
- TypeError: Cannot read properties of null (reading 'propagateTraceContextHeaders') HOT 1
- integrate with Nuxtjs but cannot see any transaction in APM HOT 11
- mssql tests are failing in CI because a recent `mcr.microsoft.com/mssql/server` docker image release breaks our healthcheck HOT 10
- Dependency Dashboard
- do a new minor release for `process.getBuiltinModule` RITM hooking HOT 1
- Support aws EventBridge instrumentation HOT 2
- [META 882] Check classic and OTel agents against serverless HOT 2
- Version v4.7.1 Lambda Layer Misconfigured: All Regions Pointing to us-east-1 HOT 3
- use IITM wrap-only-hooked support for ESM
- Add support for `koa@13`
- [META 888] Update AWS ECS Fargate container ID regex.
- Add support for tedious@19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apm-agent-nodejs.