Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ Follow [DSP channel](https://www.youtube.com/channel/UCkmz_sagT7_kxSdmttDWg9A) t
You can also use [wiki](https://github.com/giper45/DockerSecurityPlayground/wiki) documentation to understand how you can use DSP.
Follow Installation and Start steps to run DSP.

# Running it in a docker container

```sh
docker compose up
```
access it with your local ip (localhost:18181)

## How it works

The package:
* Install docker and docker-compose
Expand Down Expand Up @@ -75,7 +83,6 @@ Now you can use dsp on Remote interface.




## Update the application:
When you update the application it is important to update the npm packages (The application uses mydockerjs, a npm docker API that I am developing during DSP development: https://www.npmjs.com/package/mydockerjs)
```
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
dsp:
build: .
container_name: dsp-app
ports:
- "18181:18181"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
28 changes: 28 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:22.16

# Install required packages
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
git \
docker.io \
docker-compose \
&& rm -rf /var/lib/apt/lists/*

# create the working directory
# RUN mkdir -p /opt/DSP

# Copy the source in the DSP directory
COPY ./. opt/DSP

WORKDIR /opt/DSP

# Install backend dependencies
RUN npm install


# Expose DSP default port
EXPOSE 18181

# Start the DSP backend
CMD ["npm", "start"]()
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const healthChecker = require('./app/util/HealthLabState.js');
const errorHandler = require('express-error-handler');

const port = +process.env.PORT || 18181;
const host = process.env.DSP_IFACE || "127.0.0.1";
const host = process.env.DSP_IFACE || "0.0.0.0";
// var upload = multer({ dest: "uploads/" });
const storage = multer.memoryStorage();
const upload = multer({ storage });
Expand Down