https://github.com/zouloux/docker-debian-bun
Docker image for Bun server, based on Debian.
https://github.com/zouloux/docker-debian-bun
Last synced: 3 months ago
JSON representation
Docker image for Bun server, based on Debian.
- Host: GitHub
- URL: https://github.com/zouloux/docker-debian-bun
- Owner: zouloux
- Created: 2022-10-20T13:37:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T15:45:43.000Z (over 2 years ago)
- Last Synced: 2025-01-05T16:45:44.012Z (5 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Debian Bun aka Debun 🐇
Debun is a Docker image for Bun server based on the latest Debian image.
This docker image is built form `arm64` and `amd64`. It will work on m1 mac as well on intel architectures.
### Use it with docker-compose
##### `docker-composer.yaml`
```yaml
version: "3.7"
services:
debun :
image: 'zouloux/docker-debian-bun'
ports :
- '3000:3000'
volumes:
- './:/root'
```##### `package.json`
```json
{
"scripts" : {
"start" : "bun server.ts"
}
}```
##### `server.ts`
```ts
export default {
port: 3000,
fetch (request) {
return new Response("Welcome to Bun!");
},
};
```### Build your own and specify bun version
1. Clone this repo or download the [Dockerfile](https://raw.githubusercontent.com/zouloux/docker-debian-bun/main/Dockerfile)
2. To build a version, run `docker build -t debun:X.X.X . --build-arg BUN_VERSION=X.X.X` (replace the 2 `X.X.X` with the bun version you want)
3. Use it with a `docker-compose.yaml` or run `docker run -it debun:X.X.X`### Test it
1. `git clone https://github.com/zouloux/docker-debian-bun.git`
2. `cd docker-debian-bun/test`
3. `docker-compose up`
4. Navigate to http://localhost:3000