signoz/frontend/Dockerfile

38 lines
687 B
Docker
Raw Normal View History

# Builder stage
FROM node:16.15.0-slim as builder
# Add Maintainer Info
LABEL maintainer="signoz"
ARG TARGETOS=linux
ARG TARGETARCH
2021-01-03 18:15:44 +05:30
2021-01-20 03:59:58 +05:30
WORKDIR /frontend
2021-01-03 18:15:44 +05:30
# Copy the package.json and .yarnrc files prior to install dependencies
2021-01-20 03:59:58 +05:30
COPY package.json ./
COPY .yarnrc ./
2021-01-03 18:15:44 +05:30
2021-01-20 03:59:58 +05:30
# Install the dependencies and make the folder
RUN CI=1 yarn install
2021-01-20 03:59:58 +05:30
COPY . .
# Build the project and copy the files
RUN yarn build
FROM nginx:1.18-alpine
2021-01-20 03:59:58 +05:30
COPY conf/default.conf /etc/nginx/conf.d/default.conf
2021-01-03 18:15:44 +05:30
# Remove default nginx index page
2021-01-20 03:59:58 +05:30
RUN rm -rf /usr/share/nginx/html/*
2021-01-03 18:15:44 +05:30
2021-01-20 03:59:58 +05:30
# Copy from the stahg 1
COPY --from=builder /frontend/build /usr/share/nginx/html
2021-01-03 18:15:44 +05:30
EXPOSE 3301
2021-01-03 18:15:44 +05:30
ENTRYPOINT ["nginx", "-g", "daemon off;"]