1
0
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:
auzias 2016-09-13 13:36:44 +02:00
parent 7da1615d41
commit eee2789b9f
2 changed files with 38 additions and 1 deletions

22
Docker/Dockerfile Normal file
View 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" ]

View File

@ -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.