Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kissgyorgy/redbean-docker
Docker image for redbean from the "scratch" container
https://github.com/kissgyorgy/redbean-docker
redbean static-site-building webserver
Last synced: about 1 month ago
JSON representation
Docker image for redbean from the "scratch" container
- Host: GitHub
- URL: https://github.com/kissgyorgy/redbean-docker
- Owner: kissgyorgy
- License: mit
- Created: 2021-07-03T11:16:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-15T11:21:25.000Z (about 2 years ago)
- Last Synced: 2024-11-17T05:32:38.637Z (2 months ago)
- Topics: redbean, static-site-building, webserver
- Language: just
- Homepage: https://redbean.dev
- Size: 11.7 KB
- Stars: 346
- Watchers: 4
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cosmopolitan - redbean-docker - The smallest possible web server in Docker! (Redbean / Projects)
- my-awesome - kissgyorgy/redbean-docker - site-building,webserver pushed_at:2022-12 star:0.3k fork:0.0k Docker image for redbean from the "scratch" container (just)
README
# Redbean in Docker
The smallest possible web server in Docker!
Built from Redbean: https://redbean.dev/, a single-file distributable web server.The final container takes only 501 kB:
```
$ docker images redbean-static
REPOSITORY TAG IMAGE ID CREATED SIZE
redbean-static latest 814da89a2fa7 16 minutes ago 501 kB
```or just 186 kB if you use the tinylinux version of Redbean:
```
$ docker images redbean-tinylinux
REPOSITORY TAG IMAGE ID CREATED SIZE
redbean-tinylinux latest 0b98596e96d8 2 seconds ago 186 kB
```# Examples
There are a couple of example Dockerfiles in this repo if you want to build it yourself:
- [Dockerfile-multistage](Dockerfile-multistage) of how to produce a container from "scratch"
- [Dockerfile-tinylinux](Dockerfile-tinylinux) for the world record small version
- [Dockerfile-onbuild](Dockerfile-onbuild) if you just want a scratch container# Onbuild image
The [kissgyorgy/redbean-onbuild](https://hub.docker.com/r/kissgyorgy/redbean-onbuild)
image is not suitable to use by itself, you can build your own image with it:1. Put your static files in the `assets` directory or set your own directory name with:
```
docker build --build-arg ASSETS_DIR=something-else .
```2. build a multi-stage Docker image with a `Dockerfile` like this:
```Dockerfile
FROM kissgyorgy/redbean-onbuild as buildFROM scratch
COPY --from=build /redbean.com /
CMD ["/redbean.com", "-vv", "-p", "80"]
```Now your image includes redbean with all your static files in it and ready to run!