-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do @thaJeztah container efficiency suggestions
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "$@" |