-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBZ-7447: Docker image update (#851)
Co-authored-by: Indra Shukla <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,21 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container with Debezium UI. | ||
### | ||
|
||
FROM registry.access.redhat.com/ubi9/nodejs-18 | ||
|
||
# Set the working directory inside the container | ||
# Build UI | ||
FROM registry.access.redhat.com/ubi9/nodejs-18 AS build | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (or yarn.lock) to the working directory | ||
COPY --chown=1001 package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application code to the working directory | ||
COPY --chown=1001 . . | ||
RUN npm run build | ||
|
||
# Final image with only build artifacts | ||
FROM node:18-slim | ||
WORKDIR /app | ||
RUN npm install express | ||
COPY --from=build /app/dist/serve.js /app/dist/config.js ./ | ||
COPY --from=build /app/dist ./dist | ||
EXPOSE 3000 | ||
|
||
# Set the environment variable NODE_ENV to "production" | ||
ENV NODE_ENV=production | ||
|
||
# Set the environment variable KAFKA_CONNECT_CLUSTERS | ||
ENV KAFKA_CONNECT_CLUSTERS=http://localhost:8083/ | ||
|
||
# Build the React application | ||
RUN npm run build | ||
|
||
# Install a lightweight web server | ||
# RUN npm install -g serve | ||
|
||
# Set the command to start the web server and serve the built application | ||
CMD ["node", "serve"] | ||
|
||
# CMD ["npm", "run", "start:dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters