Skip to content
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

Add more code towards supporting ppc64le #817

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading