mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
revert: 还原 dockerfile
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -1,23 +1,23 @@
|
|||||||
FROM node:14.16 as stage-build
|
FROM node:10 as stage-build
|
||||||
ARG TARGETARCH
|
|
||||||
ARG VERSION
|
|
||||||
ENV VERSION=$VERSION
|
|
||||||
ARG NPM_REGISTRY="https://registry.npmmirror.com"
|
ARG NPM_REGISTRY="https://registry.npmmirror.com"
|
||||||
ENV NPM_REGISTY=$NPM_REGISTRY
|
ENV NPM_REGISTY=$NPM_REGISTRY
|
||||||
|
ARG SASS_BINARY_SITE="https://npmmirror.com/mirrors/node-sass"
|
||||||
|
ENV SASS_BINARY_SITE=$SASS_BINARY_SITE
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
RUN set -ex \
|
RUN npm config set sass_binary_site=${SASS_BINARY_SITE}
|
||||||
&& npm config set registry ${NPM_REGISTRY} \
|
RUN npm config set registry ${NPM_REGISTRY}
|
||||||
&& yarn config set registry ${NPM_REGISTRY} \
|
RUN yarn config set registry ${NPM_REGISTRY}
|
||||||
&& yarn config set cache-folder /root/.cache/yarn/lina
|
COPY package.json yarn.lock /data/
|
||||||
|
RUN yarn install
|
||||||
|
RUN npm rebuild node-sass
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
ENV VERSION=$VERSION
|
||||||
ADD . /data
|
ADD . /data
|
||||||
RUN --mount=type=cache,target=/root/.cache/yarn \
|
RUN cd utils && bash -xieu build.sh build
|
||||||
sed -i "s@Version <strong>.*</strong>@Version <strong>${VERSION}</strong>@g" src/layout/components/Footer/index.vue \
|
|
||||||
&& yarn install \
|
|
||||||
&& yarn build
|
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=stage-build /data/lina /opt/lina
|
COPY --from=stage-build /data/release/lina /opt/lina
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build --mode staging",
|
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "vue-cli-service build",
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
"build:stage": "vue-cli-service build --mode staging",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
|
Reference in New Issue
Block a user