You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The docker image (ghcr.io/mitre/caldera:5.0.0) does not contain the Magma plugin (dist) build files. Starting the container will fail with the following error:
ValueError: No directory exists at '/usr/src/app/plugins/magma/dist/assets'
This could be caused by an older Dockerfile being used which does not build Magma plugin's Vue project as part of the docker build process. If I build the container myself using the latest Dockerfile found in the repo, the container will start successfully.
To Reproduce
Steps to reproduce the behavior:
Start a caldera container with docker using docker run ghcr.io/mitre/caldera:5.0.0 or
Start a caldera container with Podman using podman run ghcr.io/mitre/caldera:5.0.0
Expected behavior
The container to start successfully
Screenshots
Desktop (please complete the following information):
OS: Rocky Linux
The text was updated successfully, but these errors were encountered:
Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/
Hi there, first of all, thank you very much for the project it is very useful.
I was having the same problem starting the docker-compose file and I identified the problem with the volume mount referenced in the docker-compose file, I created a workaround for those that want to use the caldera's git folder as the containers /usr/src/app folder:
The problem I identified is that the docker-compose file, uses the current dir, supposedly the caldera's git folder, as its app folder:
volumes:
- ./:/usr/src/app
Now the problem with the latest build of the Docker file (f9b0ed2) is that it is using the /usr/src/app folder to install the magma plugin and when a new container is started with the volume mounted like in the docker-compose file, the contents of the plugins/magma/ folder get overridden with the default files of caldera's git folder.
My workaround was to create a ubuntu container with the caldera's github folder mounted inside it, run the instructions of the Dockerfile pertaining the magma plugin installation and thus achieve a permanent plugin installation.
First we create the fix file in the caldera's git folder, fix.sh:
#!/bin/sh
apt-get update && \
apt-get install -y nodejs npm && \
# Directly use npm to install dependencies and build the application
(cd plugins/magma && npm install) && \
(cd plugins/magma && npm run build) && \
# Remove Node.js, npm, and other unnecessary packages
apt-get remove -y nodejs npm && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
now save it and then give it execution permissions:
chmod +x fix.sh
now we create a temporary ubuntu docker container with the caldera folder mounted inside in /app path, and execute the fix.sh script:
docker run --rm -v $PWD:/app ubuntu:23.04 ./app/fix.sh
# --rm - remove the container once it is done
# -v mount the current directory ($PWD) in /app inside the container
now the files in plugins/magma/dist folder should be present and we can start the docker-compose project:
Describe the bug
The docker image (ghcr.io/mitre/caldera:5.0.0) does not contain the Magma plugin (dist) build files. Starting the container will fail with the following error:
This could be caused by an older Dockerfile being used which does not build Magma plugin's Vue project as part of the docker build process. If I build the container myself using the latest Dockerfile found in the repo, the container will start successfully.
To Reproduce
Steps to reproduce the behavior:
docker run ghcr.io/mitre/caldera:5.0.0
orpodman run ghcr.io/mitre/caldera:5.0.0
Expected behavior
The container to start successfully
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: