-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
38 lines (32 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 . .
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 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"
COPY --from=build /splunk-otel-js/package /autoinstrumentation
RUN chmod -R go+r /autoinstrumentation
RUN cd /autoinstrumentation && ln -s ./instrument.js /autoinstrumentation/autoinstrumentation.js