mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-05-18 19:40:24 +08:00
Support docker source code construction
This commit is contained in:
20
kafka-manager-console/Dockerfile
Normal file
20
kafka-manager-console/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
ARG NODE_VERSION=12.20.0
|
||||
ARG NGINX_VERSION=1.21.5-alpine
|
||||
FROM node:${NODE_VERSION} AS builder
|
||||
ARG OUTPUT_PATH=dist
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
WORKDIR /opt
|
||||
COPY . .
|
||||
RUN npm config set registry https://registry.npm.taobao.org \
|
||||
&& npm install \
|
||||
# Change the output directory to dist
|
||||
&& sed -i "s#../kafka-manager-web/src/main/resources/templates#$OUTPUT_PATH#g" webpack.config.js \
|
||||
&& npm run prod-build
|
||||
|
||||
FROM nginx:${NGINX_VERSION}
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
COPY --from=builder /opt/dist /opt/dist
|
||||
COPY --from=builder /opt/web.conf /etc/nginx/conf.d/default.conf
|
||||
Reference in New Issue
Block a user