Code Monkey home page Code Monkey logo

redbean-docker's Introduction

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:

Onbuild image

The 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:

    FROM kissgyorgy/redbean-onbuild as build
    
    FROM 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!

redbean-docker's People

Contributors

jart avatar kissgyorgy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redbean-docker's Issues

Deploy multi websites.

I have used this docker image to deploy one website. And now i want to deploy another website, but when i typed docker build --build-arg ASSETS_DIR=./static -t yirufeng/resume .,some errors occured.

[root@VM-0-10-centos blog]# docker build --build-arg ASSETS_DIR=./static -t yirufeng/resume .
Sending build context to Docker daemon   2.56kB
Step 1/4 : FROM kissgyorgy/redbean-onbuild as build
# Executing 5 build triggers
 ---> Using cache
 ---> Using cache
 ---> Running in 0a7208db84ba

zip error: Nothing to do! (try: zip -r /redbean.com . -i *)
The command '/bin/sh -c zip -r /redbean.com *' returned a non-zero code: 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.