This commit is contained in:
Gnarwhal 2024-10-06 18:46:49 +00:00
parent cc5e6acb6a
commit ad16ec438b
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
2 changed files with 2 additions and 28 deletions

View file

@ -22,14 +22,14 @@ ENV NEXT_TELEMETRY_DISABLED=0
RUN yarn run build; RUN yarn run build;
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM base AS runner FROM chimeralinux/chimera:latest AS runner
RUN apk add nodejs shadow
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
# Uncomment the following line in case you want to disable telemetry during runtime. # Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
RUN apk add shadow
RUN groupadd --system --gid 1001 nodejs RUN groupadd --system --gid 1001 nodejs
RUN useradd --system --uid 1001 nextjs RUN useradd --system --uid 1001 nextjs

View file

@ -1,26 +0,0 @@
#!/usr/bin/env python3
import re
import subprocess
import sys
if len(sys.argv) < 2:
print("Must provide version string", file=sys.stderr)
exit(1)
version_pattern = re.compile(r"(\d+).(\d+).(\d+)")
version = version_pattern.match(sys.argv[1])
command = [
"podman",
"build",
"--tag", "forge.monodon.me/gnarwhal/motto:latest",
"--tag", f"forge.monodon.me/gnarwhal/motto:{version[1]}",
"--tag", f"forge.monodon.me/gnarwhal/motto:{version[1]}.{version[2]}",
"--tag", f"forge.monodon.me/gnarwhal/motto:{version[1]}.{version[2]}.{version[3]}",
"./",
]
print("Building:", " ".join(command))
subprocess.run(command)