openreplay/sourcemapreader/Dockerfile
Rajesh Rajendran 7f9ab3eb1d refactor(sourcemapreader): renaming sourcemap reader (#1676)
Helm chart, image, and sourcefolder are of different names, which causes
confusion and difficulties to automate builds.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2023-11-20 16:15:12 +01:00

28 lines
660 B
Docker

FROM node:20-alpine
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
ARG GIT_SHA
LABEL GIT_SHA=$GIT_SHA
RUN apk add --no-cache tini
ARG envarg
ENV SOURCE_MAP_VERSION=0.7.4 \
APP_NAME=sourcemaps-reader \
LISTEN_PORT=9000 \
MAPPING_WASM=/work/mappings.wasm \
PRIVATE_ENDPOINTS=true \
GIT_SHA=$GIT_SHA \
ENTERPRISE_BUILD=${envarg} \
NODE_ENV=production
ADD https://unpkg.com/source-map@${SOURCE_MAP_VERSION}/lib/mappings.wasm ${MAPPING_WASM}
WORKDIR /work
COPY *.json ./
RUN npm install && chmod 644 ${MAPPING_WASM}
COPY . .
RUN adduser -u 1001 openreplay -D
USER 1001
ENTRYPOINT ["/sbin/tini", "--"]
CMD ./entrypoint.sh