web: remove all unnecessary junk from the container after building (experiment & saves ~2GBs)
This commit is contained in:
parent
fdc1f1aadf
commit
f0c39f5837
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
build
|
||||
bun.lockb
|
||||
bun.lockb
|
||||
.gitignore
|
@ -10,4 +10,12 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN bun install
|
||||
RUN bun run build
|
||||
|
||||
RUN rm -rf src eslint.config.mjs tsconfig.json
|
||||
|
||||
RUN bun remove "@emotion/react" "@emotion/styled" "@mui/icons-material" "@mui/material" "react" "react-dom" "sass"
|
||||
# bun prune --production
|
||||
# Uh-oh. bun prune is a subcommand reserved for future use by Bun.
|
||||
RUN bun remove "typescript" "@types/node" "@types/react" "@types/react-dom" "eslint" "eslint-config-next" "@eslint/eslintrc"
|
||||
|
||||
ENTRYPOINT ["bun", "run", "start"]
|
@ -2,7 +2,6 @@ import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
distDir: "build",
|
||||
output: "standalone",
|
||||
rewrites: async () => {
|
||||
return [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user