lighter docker image

This commit is contained in:
Thomas 2025-03-18 18:07:21 +01:00
parent b04e30c98e
commit c4910f3db3
2 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
storybook-static

View File

@ -1,10 +1,16 @@
FROM node:lts-alpine as build FROM node:lts-alpine as build
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package*.json ./
COPY package-lock.json ./
RUN npm install RUN npm install
COPY . . COPY . .
EXPOSE 6006 RUN npm run build-storybook
CMD ["npm", "run", "storybook", "--", "--no-open"]
FROM node:lts-alpine as main
RUN npm i -g http-server
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY --from=build /app/storybook-static /app/storybook-static
EXPOSE 6006
CMD [ "http-server", "/app/storybook-static" ]