Dear Docker Community:
In a Docker definition (Dockerfile), I have generally focus on containerizing my application, which includes specifying how the application environment should be set up and what should be included in the container. The MVC (Model-View-Controller) structure is a design pattern for organizing the code within your Node.js application, and it primarily relates to the code and application structure inside the container, not the Dockerfile itself. However, each time I have run the Docker command then I have typed in the localhost:8080 then I will receive an error message that stated “CANNOT GET”.
Here is an example of my Dockerfile Definition:
COPY controllers /ivoteballot/
COPY models /ivoteballot/
COPY . .
COPY package.json /ivoteballot/
COPY package-lock.json /ivoteballot/
RUN npm install
CMD [“node”, “index.js”]
Here is my docker command lines:
2023-10-05 18:42:31 The contactUs_01_Session have been successfully created
2023-10-05 18:42:31 Thu, 05 Oct 2023 23:42:31 GMT express-session deprecated undefined resave option; provide resave option at models/contactUs_01_Router.js:99:2
2023-10-05 18:42:31 Thu, 05 Oct 2023 23:42:31 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at models/contactUs_01_Router.js:99:2
2023-10-05 18:42:31 The user’s have successfully created an Alabama PDF candidates file final results
2023-10-05 18:42:31 The user had successfully download the Alabama PDF candidates file have been successfully created.
2023-10-05 18:42:31 The Nodejs in conjunction with Express framework is listening onto port 8080 from express’ iVoteBallotApp prototype 2.
2023-10-05 18:42:31 Developer has created a Sqlite3 database table which was programmatically coded successfully!
And, her is my error message: