-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.ui
More file actions
30 lines (21 loc) · 746 Bytes
/
Dockerfile.ui
File metadata and controls
30 lines (21 loc) · 746 Bytes
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
FROM node:18-alpine as builder
# Set the working directory to /app
WORKDIR /app
# Copy the package.json and package-lock.json files to the container
COPY demo-ui/ ./
# Install dependencies and make production build
RUN npm ci && npm run build
# Create a new container that's a super light-weight web server
FROM busybox
# Add a reverse proxy to the druid container so our webapp can talk to it
RUN echo "P:/druid/:http://druid:8888/druid/" > /etc/httpd.conf
# Create a non-root user to own the files and run our server
RUN adduser -D static
USER static
WORKDIR /site
# Copy the webapp
COPY --from=builder /app/build/ ./
# Run BusyBox httpd
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]
# Expose port 3000 for the webapp
EXPOSE 3000