upgrade docker images to node 18, fix docker issue

This commit is contained in:
JandereDev 2022-07-16 09:22:58 +02:00
parent 0637a5ef72
commit 22cbf57241
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
4 changed files with 12 additions and 12 deletions

View file

@ -1,4 +1,4 @@
FROM node:16 as build FROM node:18 as build
WORKDIR /build/app WORKDIR /build/app
COPY api/package.json api/yarn.lock api/.yarnrc.yml ./ COPY api/package.json api/yarn.lock api/.yarnrc.yml ./
COPY api/.yarn ./.yarn COPY api/.yarn ./.yarn
@ -9,11 +9,11 @@ RUN yarn install --immutable
COPY ./api . COPY ./api .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:18 as prod
WORKDIR /app/api WORKDIR /app/api
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./ COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist COPY --from=build /build/app/dist ./dist
COPY ./lib ../lib COPY --from=build /build/lib ../lib
RUN yarn install --immutable RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -1,4 +1,4 @@
FROM node:16 as build FROM node:18 as build
WORKDIR /build/app WORKDIR /build/app
COPY bot/package.json bot/yarn.lock bot/.yarnrc.yml ./ COPY bot/package.json bot/yarn.lock bot/.yarnrc.yml ./
COPY bot/.yarn ./.yarn COPY bot/.yarn ./.yarn
@ -9,11 +9,11 @@ RUN yarn install --immutable
COPY ./bot . COPY ./bot .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:18 as prod
WORKDIR /app/bot WORKDIR /app/bot
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./ COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist COPY --from=build /build/app/dist ./dist
COPY ./lib ../lib COPY --from=build /build/lib ../lib
RUN yarn install --immutable RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -1,4 +1,4 @@
FROM node:16 as build FROM node:18 as build
WORKDIR /build/app WORKDIR /build/app
COPY bridge/package.json bridge/yarn.lock bridge/.yarnrc.yml ./ COPY bridge/package.json bridge/yarn.lock bridge/.yarnrc.yml ./
COPY bridge/.yarn ./.yarn COPY bridge/.yarn ./.yarn
@ -9,11 +9,11 @@ RUN yarn install --immutable
COPY ./bridge . COPY ./bridge .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:18 as prod
WORKDIR /app/bridge WORKDIR /app/bridge
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./ COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist COPY --from=build /build/app/dist ./dist
COPY ./lib ../lib COPY --from=build /build/lib ../lib
RUN yarn install --immutable RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -1,4 +1,4 @@
FROM node:16 as build FROM node:18 as build
ARG VITE_API_URL ARG VITE_API_URL
ARG VITE_BOT_PREFIX ARG VITE_BOT_PREFIX
WORKDIR /build/app WORKDIR /build/app
@ -11,12 +11,12 @@ RUN yarn install --immutable
COPY web . COPY web .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:18 as prod
WORKDIR /app/web WORKDIR /app/web
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./ COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist COPY --from=build /build/app/dist ./dist
COPY ./lib ../lib COPY --from=build /build/lib ../lib
RUN yarn add vite RUN yarn add vite
# Running this with bash -c because it won't exit on ctrl+c otherwise # Running this with bash -c because it won't exit on ctrl+c otherwise
CMD ["bash", "-c", "yarn preview --port=80 --strictPort=true --clearScreen=false --host"] CMD ["bash", "-c", "yarn preview --port=80 --strictPort=true --clearScreen=false --host"]