diff --git a/Dockerfile b/Dockerfile
index 8ad4ad7..dc91c51 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# Use the official Node.js image as the base image
-FROM node:24-alpine
+FROM node:24-trixie-slim
# Set the working directory inside the container
WORKDIR /usr/src/app
diff --git a/src/app/_components/docker-table.tsx b/src/app/_components/docker-table.tsx
index 30d0d4d..da8f579 100644
--- a/src/app/_components/docker-table.tsx
+++ b/src/app/_components/docker-table.tsx
@@ -9,7 +9,7 @@ function DockerRow({
}: {
containerInfo: dockerRouterType["list"][number];
}) {
- const { data: latest, isError, isLoading } = api.docker.latest.useQuery({ id: containerInfo.container.id });
+ const { data: latest, isError, isLoading } = api.docker.latest.useQuery({ id: containerInfo.container.id }, { refetchOnMount: false, refetchOnWindowFocus: false, refetchOnReconnect: false });
const outdated = containerInfo.image.current.hash !== latest?.latest.hash;
let latestFragment: JSX.Element | null = null;
@@ -52,7 +52,7 @@ function DockerRow({
}
export function DockerTable() {
- const { data: list, isLoading: listLoading } = api.docker.list.useQuery();
+ const { data: list, isLoading: listLoading } = api.docker.list.useQuery(undefined, { refetchOnMount: false, refetchOnWindowFocus: false, refetchOnReconnect: false });
return (
{!listLoading ? (
diff --git a/src/server/api/routers/docker.ts b/src/server/api/routers/docker.ts
index 1ca1386..55fa5ff 100644
--- a/src/server/api/routers/docker.ts
+++ b/src/server/api/routers/docker.ts
@@ -14,6 +14,7 @@ export const dockerRouter = createTRPCRouter({
const container = containers.find((container) => container.Id === input.id);
if (!container) {
+ console.error(`Container with id ${input.id} not found`);
throw new TRPCError({
code: "NOT_FOUND",
message: `Container with id ${input.id} not found`,
@@ -27,6 +28,7 @@ export const dockerRouter = createTRPCRouter({
latest: await getLatest(imageData.name, imageData.tag),
};
} catch (ex) {
+ console.error(ex);
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: (ex as Error).message,
@@ -159,9 +161,10 @@ function isSemver(tag: string): boolean {
}
async function getHash(image: string) {
- const latestImage = await $`bin/regctl image digest ${image}`.text();
+ const latestImage = await $`./bin/regctl image digest ${image}`.text();
const hash = latestImage.split(":")?.[1]?.substring(0, 12);
if (!hash) {
+ console.error(`Hash not found: ${latestImage}`);
throw new Error("Hash not found", {
cause: {
imageDigest: latestImage,
@@ -189,8 +192,8 @@ async function getLatest(image: string, tag?: string): Promise<{ hash: string; t
}
async function getSemverTag(image: string): Promise<{ hash: string; tag?: string }> {
- const allTags = await $`bin/regctl tag ls --exclude 'version.*' --exclude 'unstable.*' --exclude '.*rc.*' --exclude 'lib.*' --exclude 'release.*' --exclude 'arm.*
-' --exclude 'amd.*' ${image}`.text();
+ const allTags =
+ await $`./bin/regctl tag ls --exclude 'version.*' --exclude 'unstable.*' --exclude '.*rc.*' --exclude 'lib.*' --exclude 'release.*' --exclude 'arm.*' --exclude 'amd.*' ${image}`.text();
const semverTags = allTags.split("\n").filter((tag) => isSemver(tag));
const newestTag = semver.rsort(semverTags)[0];