Add files for building into a container - #57
Conversation
|
Jeroendev (@jeroendev-one) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds containerization support for the Copilot metrics dashboard application by introducing Docker Compose and container build configurations. The changes enable developers to easily build and run the dashboard in a containerized environment.
- Adds Docker Compose configuration for service orchestration
- Creates a Containerfile for building the dashboard container image
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| compose.yaml | Defines the copilot-metrics-dashboard service with build context, port mapping, and environment configuration |
| Containerfile | Container build instructions using Node.js 20 base image with application setup and entry point |
| @@ -0,0 +1,8 @@ | |||
| FROM docker.io/node:20-bullseyeAdd commentMore actions | |||
There was a problem hiding this comment.
The base image line contains extraneous text 'Add commentMore actions' that appears to be UI artifacts. It should be 'FROM docker.io/node:20-bullseye'.
| FROM docker.io/node:20-bullseyeAdd commentMore actions | |
| FROM docker.io/node:20-bullseye |
| @@ -0,0 +1,8 @@ | |||
| FROM docker.io/node:20-bullseyeAdd commentMore actions | |||
|
|
|||
| COPY src $HOME/copilot-dash | |||
There was a problem hiding this comment.
The COPY instruction copies 'src' to '$HOME/copilot-dash', but later commands reference 'dashboard' directory. This path inconsistency will cause the build to fail.
| COPY src $HOME/copilot-dash | |
| COPY src dashboard |
| RUN cd dashboard && npm install | ||
|
|
||
| WORKDIR dashboard |
There was a problem hiding this comment.
The command tries to change to 'dashboard' directory, but the COPY instruction above copies to '$HOME/copilot-dash'. The directory names are inconsistent.
| RUN cd dashboard && npm install | |
| WORKDIR dashboard | |
| RUN cd $HOME/copilot-dash && npm install | |
| WORKDIR $HOME/copilot-dash |
| RUN cd dashboard && npm install | ||
|
|
||
| WORKDIR dashboard |
There was a problem hiding this comment.
The WORKDIR references 'dashboard' but this directory doesn't exist based on the COPY instruction that uses '$HOME/copilot-dash'.
| RUN cd dashboard && npm install | |
| WORKDIR dashboard | |
| RUN cd $HOME/copilot-dash && npm install | |
| WORKDIR $HOME/copilot-dash |
No description provided.