📋 An alpine-based docker image to run 0bin (A Pastebin alternative).
100K+
An alpine-based docker image to run 0bin.
Run the 0bin image:
docker run --name 0bin --detach gabe565/0bin
If you wil access the image from another machine, you will need to add the server port mapping. This example will bind to port 8080 of the host machine:
docker run --name 0bin -p 8080:80 -d gabe565/0bin
For data persistance, make sure that the /data directory is bound to a volume or local directory.
docker volume create 0bin_data
docker run --name 0bin -p 8080:80 -v 0bin_data:/data -d gabe565/0bin
Most of the original 0bin options can be changed through environment variables to allow for customization.
Some of the defaults have been changed to work more smoothly with Docker, listed below.
| Variable | Description | Default Value |
|---|---|---|
| HOST | IP address to bind to. | 0.0.0.0 |
| PORT | Post to listen on. | 80 |
| DEBUG | Enable debug output on 500 errors and watch files for hotswapping. | false |
| USER | The user to run under after startup. | root |
| GROUP | Group to run under after startup. | Match USER |
| COMPRESSED_STATIC_FILES | Serve minified css and js files. | true |
| PASTE_FILES_ROOT | Location to store encrypted paste files. | /data |
| CUSTOM_TEMPLATE_DIR | Location of custom template files. Templates here take precedence over the built-in templates. | /views |
| MENU | Allows the navigation menu to be changed. | [["Home","/"],["Download 0bin","https://github.com/sametmax/0bin"],["Faq","/faq/"],["Contact","mailto:[email protected]"]] |
| MAX_SIZE | Maximum paste filesize. Careful with this one since pastes are client-side encrypted. Large files can slow down a user's browser. | ~500KB |
| DISPLAY_COUNTER | Enable or disable the paste counter in the page footer. | true |
| REFRESH_COUNTER | How often to refresh the paste counter. | 60 * 1 |
| PASTE_ID_LENGTH | Length of the generated URL paste ID. | 8 |
The CUSTOM_TEMPLATE_DIR environment variable allows for a directory to be used for modified templates while still falling back to the defaults. This location defaults to /views.
To pull these into a local directory, run the following with the container running:
docker cp 0bin:/app/zerobin/views views
Then the templates will be available for modification in your local directory.
To serve these templates in the container, restart it with a read-only volume binding to ./views:
docker run --name 0bin -p 8080:80 -v data:/data -v ./views:/views:ro -d gabe565/0bin
Content type
Image
Digest
Size
33.1 MB
Last updated
over 7 years ago
docker pull gabe565/0bin