Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: local images for reverting

Andras Bacsaie83de8b9383b
diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts
index 4f0a2e9fe3..fb27f2701d 100644
--- a/apps/api/src/routes/api/v1/applications/handlers.ts
+++ b/apps/api/src/routes/api/v1/applications/handlers.ts
@@ -845,15 +845,16 @@ export async function getDockerImages(request) {
try {
const { stdout } = await executeCommand({
dockerId: application.destinationDocker.id,
- command: `docker images --format '{{.Repository}}#{{.Tag}}#{{.CreatedAt}}' | grep -i ${id} | grep -v cache`,
- shell: true
+ command: `docker images --format '{{.Repository}}#{{.Tag}}#{{.CreatedAt}}'`
});
const { stdout: runningImage } = await executeCommand({
dockerId: application.destinationDocker.id,
command: `docker ps -a --filter 'label=com.docker.compose.service=${id}' --format {{.Image}}`
});
- const images = stdout.trim().split('\n');
-
+ const images = stdout
+ .trim()
+ .split('\n')
+ .filter((image) => image.includes(id) && !image.includes('-cache'));
for (const image of images) {
const [repository, tag, createdAt] = image.split('#');
if (tag.includes('-')) {
@@ -874,6 +875,7 @@ export async function getDockerImages(request) {
runningImage
};
} catch (error) {
+ console.log(error);
return {
imagesAvailables
};