mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-26 07:08:08 +00:00
Merge pull request #65 from sekka1/master
Add Docker file container build
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM ubuntu:14.04.1
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y python-setuptools python-dev build-essential libffi-dev libssl-dev
|
||||
|
||||
WORKDIR /opt
|
||||
ADD . /opt/app
|
||||
WORKDIR /opt/app
|
||||
|
||||
RUN python setup.py build
|
||||
RUN python setup.py install
|
||||
|
||||
ADD docker/run.sh /opt/run.sh
|
||||
RUN chmod 777 /opt/run.sh
|
||||
|
||||
EXPOSE 57575
|
||||
|
||||
CMD ["/opt/run.sh"]
|
||||
13
README.md
13
README.md
@@ -67,3 +67,16 @@ Run `python dev.py --debug --port=12345` and you are set (yes you can launch it
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
```
|
||||
|
||||
## Docker Usage
|
||||
There is a docker repository created for this project that is set to automatically rebuild when there is a push
|
||||
into this repository: https://registry.hub.docker.com/u/garland/butterfly/
|
||||
|
||||
### Starting
|
||||
|
||||
docker run \
|
||||
--env PASSWORD=password \
|
||||
--env PORT=57575 \
|
||||
-p 57575:57575 \
|
||||
-d garland/butterfly
|
||||
|
||||
|
||||
13
docker/run.sh
Normal file
13
docker/run.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set password
|
||||
echo "root:${PASSWORD}" | chpasswd
|
||||
|
||||
if [ -z ${PORT} ]
|
||||
then
|
||||
echo "Starting on default port: 57575"
|
||||
/opt/app/butterfly.server.py --unsecure --host=0.0.0.0
|
||||
else
|
||||
echo "Starting on port: ${PORT}"
|
||||
/opt/app/butterfly.server.py --unsecure --host=0.0.0.0 --port=${PORT}
|
||||
fi
|
||||
Reference in New Issue
Block a user