Skip to content

Conversation

nblair2
Copy link

@nblair2 nblair2 commented Sep 12, 2025

Description

currently, mounting all of the working directory to the app dir in the container means that the UI built in the container at /usr/src/app/plugins/magma is overwritten by what is on the host. If the UI is not built on the host, the container and docker-compose will not work as expected.

This change adds a volume to protect the contents of the built UI in the container from being overwritten by the host's content in /usr/src/app/plugins/magma

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

git clone https://github.com/nblair2/caldera --branch docker-compose --recursive
cd caldera
sed -i -e '/download_payloads\.sh/s/^/#/' Dockerfile
docker compose up --build
firefox localhost:8888

browse UI, works

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

currently, mounting all of the working directory to the app dir in
the container means that the UI built in the container at
`/usr/src/app/plugins/magma` is overwritten by what is on the host.
If the UI is not built on the host, the container and docker-compose
will not work as expected.

This change adds a volume to protect the contents of the built UI in
the container from being overwritten by the host's content in
`/usr/src/app/plugins/magma`
@nblair2 nblair2 marked this pull request as draft September 12, 2025 14:52
@nblair2 nblair2 marked this pull request as ready for review September 12, 2025 16:55
@deacon-mp deacon-mp requested a review from Copilot September 29, 2025 23:23
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a Docker Compose issue where the host directory mount was overwriting the pre-built UI components in the container. The solution adds a named volume to protect the built UI directory from being overwritten by the host mount.

  • Adds a container name for better identification
  • Protects the pre-built UI directory from host mount overwrites

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

nblair2 and others added 2 commits September 29, 2025 17:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nblair2
Copy link
Author

nblair2 commented Sep 29, 2025

@deacon-mp one copilot suggestion accepted. Let me know if you need these commits squashed.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants