Created
April 8, 2016 08:35
-
-
Save greut/f1c0f88ab8b6712d645d1602fd5e5ec8 to your computer and use it in GitHub Desktop.
Simple flask container.
This file contains hidden or 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
web: | |
build: . | |
volumes: | |
- .:/code/shared | |
ports: | |
- "8080:8080" | |
- "5000:5000" |
This file contains hidden or 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
FROM buildpack-deps:jessie | |
EXPOSE 8080 5000 | |
ENV LANG C.UTF-8 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && \ | |
apt-get upgrade -q -y && \ | |
apt-get install -q -y \ | |
nano \ | |
python-pip \ | |
sqlite3 \ | |
sudo && \ | |
apt-get clean -q -y && \ | |
pip install virtualenv && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
VOLUME /code/shared | |
RUN mkdir -p /code/shared && \ | |
adduser --uid 1000 --disabled-password --gecos '' flask && \ | |
chown -R flask:staff /code | |
RUN echo '%flask ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/flask | |
RUN chmod 0440 /etc/sudoers.d/flask | |
USER flask | |
WORKDIR /code | |
CMD ["/usr/bin/env", "python", "-m", "SimpleHTTPServer", "8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment