Permalink
Browse files

Do @thaJeztah container efficiency suggestions

  • Loading branch information...
sekka1 authored and Silex committed Aug 10, 2016
1 parent 1ec5081 commit cc510500a5eaec903386690508821fd8b27ee6eb
Showing with 26 additions and 10 deletions.
  1. +13 −5 Dockerfile
  2. +2 −2 README.md
  3. +11 −3 docker/run.sh
View
@@ -1,17 +1,25 @@
FROM ubuntu:14.04.4
RUN apt-get update -y
RUN apt-get install -y python-setuptools python-dev build-essential libffi-dev libssl-dev
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
python-dev \
python-setuptools \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
WORKDIR /opt
ADD . /opt/app
WORKDIR /opt/app
RUN python setup.py build
RUN python setup.py install
RUN python setup.py build \
&& python setup.py install
ADD docker/run.sh /opt/run.sh
EXPOSE 57575
ENTRYPOINT ["/opt/run.sh"]
CMD ["butterfly.server.py", "--unsecure", "--host=0.0.0.0"]
ENTRYPOINT ["docker/run.sh"]
View
@@ -114,7 +114,7 @@ Starting with login and password
docker run \
--env PASSWORD=password \
-p 57575:57575 \
-d garland/butterfly --unsecure --host=0.0.0.0 --port=57575 --login
-d garland/butterfly --port=57575 --login
```
Starting with no password
@@ -123,5 +123,5 @@ Starting with no password
docker run \
--env PORT=57575 \
-p 57575:57575 \
-d garland/butterfly --unsecure --host=0.0.0.0 --port=57575
-d garland/butterfly --port=57575
```
View
@@ -1,6 +1,14 @@
#!/bin/sh -x
#!/bin/bash -e
# if command starts with an option, prepend the default command and options
if [ "${1:0:1}" = '-' ]; then
set -- butterfly.server.py --unsecure --host=0.0.0.0 --port=${PORT:-57575} "$@"
elif [ "$1" = 'butterfly.server.py' ]; then
shift
set -- butterfly.server.py --unsecure --host=0.0.0.0 --port=${PORT:-57575} "$@"
fi
# Set password
echo "root:${PASSWORD}" | chpasswd
echo "root:${PASSWORD:-password}" | chpasswd
/opt/app/butterfly.server.py $@
exec "$@"

0 comments on commit cc51050

Please sign in to comment.