- Testing without Docker
cd ../app
npm i
node server.js
- Testing with Docker to test defensive capability
# Make sure to be in the same directory as the Dockerfile
# Build the Docker image
docker build . -t inf8602/node-web-app
# Your docker image should be listed by Docker
docker images
# Run the image
docker run -p 8080:8080 -d inf8602/node-web-app
# Print the output of the app
docker ps #get the container id
docker logs <container id> # print app output
# Example
# Hello World
- Testing the fix (disabling priviledge bpf)
sudo sysctl kernel.unprivileged_bpf_disabled=1
cd ../app
npm i
node server.js
- Testing with Dev containers
Open in Container