Skip to content

Commit 19a0166

Browse files
author
Mauricio Siu
committed
fix: simplify getServiceImageDigest command for improved reliability
- Refactored the getServiceImageDigest function to streamline the command used for retrieving the Docker service image digest, enhancing reliability. - Removed unnecessary console logging for the current digest.
1 parent 605de97 commit 19a0166

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/server/src/services/settings.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,10 @@ export const pullLatestRelease = async () => {
4242
/** Returns Dokploy docker service image digest */
4343
export const getServiceImageDigest = async () => {
4444
const { stdout } = await execAsync(
45-
`docker image ls --digests --format '{{.Repository}}:{{.Tag}} {{.Digest}}' | \
46-
grep "$(docker service inspect dokploy --format '{{.Spec.TaskTemplate.ContainerSpec.Image}}')" | \
47-
awk '{print $2}' | \
48-
awk -F':' '{print $2}'`,
45+
"docker service inspect dokploy --format '{{.Spec.TaskTemplate.ContainerSpec.Image}}'",
4946
);
5047

5148
const currentDigest = stdout.trim().split("@")[1];
52-
console.log("currentDigest: ", currentDigest);
5349

5450
if (!currentDigest) {
5551
throw new Error("Could not get current service image digest");

0 commit comments

Comments
 (0)