mirror of
https://github.com/Finsys/dockhand.git
synced 2026-06-17 19:09:33 +03:00
chore: delete the unnecessary functions called
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
|||||||
import { getEnvironment, getEnvSetting, getSetting } from './db';
|
import { getEnvironment, getEnvSetting, getSetting } from './db';
|
||||||
import { sendEventNotification } from './notifications';
|
import { sendEventNotification } from './notifications';
|
||||||
import {
|
import {
|
||||||
detectHostDataDir,
|
|
||||||
getHostDockerSocket,
|
getHostDockerSocket,
|
||||||
getHostDataDir,
|
getHostDataDir,
|
||||||
extractUidFromSocketPath,
|
extractUidFromSocketPath,
|
||||||
@@ -618,10 +617,6 @@ async function runScannerContainerCore(
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
console.log(`[Scanner] Starting ${scannerType} scan for image: ${imageName}, envId: ${envId ?? 'local'}`);
|
console.log(`[Scanner] Starting ${scannerType} scan for image: ${imageName}, envId: ${envId ?? 'local'}`);
|
||||||
|
|
||||||
// Ensure startup inspect caches are populated before we mirror Dockhand's own
|
|
||||||
// Docker access settings into sibling sidecars.
|
|
||||||
await detectHostDataDir().catch(() => null);
|
|
||||||
|
|
||||||
// Always use the base cache path — serial lock prevents concurrent conflicts
|
// Always use the base cache path — serial lock prevents concurrent conflicts
|
||||||
const basePath = scannerType === 'grype' ? '/cache/grype' : '/cache/trivy';
|
const basePath = scannerType === 'grype' ? '/cache/grype' : '/cache/trivy';
|
||||||
const dbPath = basePath;
|
const dbPath = basePath;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { json } from '@sveltejs/kit';
|
import { json } from '@sveltejs/kit';
|
||||||
import { authorize } from '$lib/server/authorize';
|
import { authorize } from '$lib/server/authorize';
|
||||||
import {
|
import {
|
||||||
detectHostDataDir,
|
|
||||||
getOwnContainerId,
|
getOwnContainerId,
|
||||||
getHostDockerSocket,
|
getHostDockerSocket,
|
||||||
getOwnDockerHost,
|
getOwnDockerHost,
|
||||||
@@ -262,9 +261,6 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
|
|||||||
return json({ error: 'Not running in Docker' }, { status: 400 });
|
return json({ error: 'Not running in Docker' }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate cached inspect data used to mirror Dockhand's own sidecar settings.
|
|
||||||
await detectHostDataDir().catch(() => null);
|
|
||||||
|
|
||||||
const writable = await isDockerWritable(containerId);
|
const writable = await isDockerWritable(containerId);
|
||||||
if (!writable) {
|
if (!writable) {
|
||||||
return json({
|
return json({
|
||||||
|
|||||||
Reference in New Issue
Block a user