Skip to content

Commit

Permalink
Add more code towards supporting ppc64le
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Oct 13, 2023
1 parent 66f7416 commit 537586a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test splunk-otel-js Docker image

on:
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/test-docker-image.yml'

jobs:
test-image:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: docker/setup-buildx-action@v2
- name: build container
uses: docker/[email protected]
with:
file: Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
build-args: |
RELEASE_VER=${{ env.GITHUB_REF_NAME }}
24 changes: 22 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
FROM node:16 AS build
FROM node:16 AS build-amd64
WORKDIR /splunk-otel-js
COPY . .
RUN npm install
RUN npm run compile
RUN npm run prebuild:os '14.0.0' '15.0.0' '16.0.0' '17.0.1' '18.0.0'
RUN npm pack && tar xf splunk-otel-$(npm view @splunk/otel version).tgz
RUN npm prune --omit=dev && cp -r node_modules/ package

FROM node:16 AS build-arm64

WORKDIR /splunk-otel-js
COPY . .
Expand All @@ -8,8 +17,19 @@ RUN npm run prebuild:os '14.0.0' '15.0.0' '16.0.0' '17.0.1' '18.0.0'
RUN npm pack && tar xf splunk-otel-$(npm view @splunk/otel version).tgz
RUN npm prune --omit=dev && cp -r node_modules/ package

FROM busybox
FROM ppc64le/node:16 AS build-ppc64le
WORKDIR /splunk-otel-js
COPY . .
RUN npm install
RUN npm run compile
RUN npm run prebuild:os '14.0.0' '15.0.0' '16.0.0' '17.0.1' '18.0.0'
RUN npm pack && tar xf splunk-otel-$(npm view @splunk/otel version).tgz
RUN npm prune --omit=dev && cp -r node_modules/ package

FROM build-$TARGETARCH AS build

FROM busybox
ARG TARGETARCH
LABEL org.opencontainers.image.source="https://github.com/signalfx/splunk-otel-js"
LABEL org.opencontainers.image.description="Splunk Distribution of OpenTelemetry Node.js Instrumentation"

Expand Down

0 comments on commit 537586a

Please sign in to comment.