mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Docker details added.
The `Dockerfile` is in the directory Docker. The image can be built from this, and run with the two option described in the `README.srt`.
This commit is contained in:
parent
7da1615d41
commit
eee2789b9f
22
Docker/Dockerfile
Normal file
22
Docker/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
MAINTAINER Maël Auzias <docker@mael.auzias.net>
|
||||||
|
|
||||||
|
|
||||||
|
# python3
|
||||||
|
RUN adduser -S python
|
||||||
|
RUN apk --no-cache add python3
|
||||||
|
|
||||||
|
# pip3
|
||||||
|
RUN apk --no-cache add curl \
|
||||||
|
ca-certificates \
|
||||||
|
&& curl -O https://bootstrap.pypa.io/get-pip.py \
|
||||||
|
&& python3 get-pip.py \
|
||||||
|
&& rm get-pip.py
|
||||||
|
|
||||||
|
# 0bin https://github.com/sametmax/0bin
|
||||||
|
RUN pip install zerobin \
|
||||||
|
&& chown python:root -R /usr/lib/python3.5/site-packages/zerobin/
|
||||||
|
|
||||||
|
USER python
|
||||||
|
|
||||||
|
ENTRYPOINT [ "zerobin", "--host=0.0.0.0" ]
|
17
README.rst
17
README.rst
@ -24,6 +24,21 @@ but in short::
|
|||||||
|
|
||||||
0bin runs on Python 2.7 and Python 3.4.
|
0bin runs on Python 2.7 and Python 3.4.
|
||||||
|
|
||||||
|
|
||||||
|
Docker
|
||||||
|
======
|
||||||
|
|
||||||
|
A Docker image is available. The [`Dockerfile`](Docker/Dockerfile) is in the `Docker` directory. Once in the directory, build the image with the command:
|
||||||
|
|
||||||
|
docker build -t 0bin .
|
||||||
|
|
||||||
|
Then run it with the command:
|
||||||
|
|
||||||
|
docker run -p 8000:8000 -d -v /host/path/to/content/dir:/usr/lib/python3.5/site-packages/zerobin/static/content
|
||||||
|
|
||||||
|
The option `-p 8000:8000` is needed to publish the port of the service. As for the option `-v /host/path/to/content/dir:/usr/lib/python3.5/site-packages/zerobin/static/content`, it is needed to persist the data.
|
||||||
|
|
||||||
|
|
||||||
How it works
|
How it works
|
||||||
=============
|
=============
|
||||||
|
|
||||||
@ -113,7 +128,7 @@ For small fixes (typo and such), you can work on master.
|
|||||||
|
|
||||||
For features, you should create a dedicated branch.
|
For features, you should create a dedicated branch.
|
||||||
|
|
||||||
In any case, if you modify Javascript or CSS files, you shall run compress.sh afterward to provide the minified files. It requires your to have yui-compressor installed (apt-get install yui-compressor on the debian family).
|
In any case, if you modify Javascript or CSS files, you shall run compress.sh afterward to provide the minified files. It requires your to have yui-compressor installed (`apt-get install yui-compressor` on the debian family).
|
||||||
|
|
||||||
We don't require you to rebase/merge, ordinary merging is alright.
|
We don't require you to rebase/merge, ordinary merging is alright.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user