Skip to content

Instantly share code, notes, and snippets.

@mosluce
Created December 9, 2017 05:15
Show Gist options
  • Save mosluce/de763de33da66595424afba50a01cf5d to your computer and use it in GitHub Desktop.
Save mosluce/de763de33da66595424afba50a01cf5d to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
# Essential packages
RUN apt-get update
RUN apt-get install -y build-essential binutils-doc autoconf flex bison libjpeg-dev
RUN apt-get install -y libfreetype6-dev zlib1g-dev libzmq3-dev libgdbm-dev libncurses5-dev
RUN apt-get install -y automake libtool libffi-dev curl git tmux gettext
# Python
RUN apt-get install -y python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper
RUN apt-get install -y libxml2-dev libxslt-dev
RUN apt-get install -y libssl-dev libffi-dev
RUN apt-get install -y sudo
# ADD USER
RUN useradd -m -s /bin/bash taiga
RUN sudo adduser taiga sudo
RUN echo 'taiga ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# su taiga
USER taiga
WORKDIR /home/taiga
RUN mkdir -p ~/logs
RUN git clone https://github.com/taigaio/taiga-back.git taiga-back
WORKDIR /home/taiga/taiga-back
RUN git checkout stable
COPY ./startup.sh startup.sh
CMD ./startup.sh
#!/bin/bash
mkvirtualenv -p /usr/bin/python3.5 taiga # mkvirtualenv: command not found
pip install -r requirements.txt
python manage.py migrate --noinput
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py compilemessages
python manage.py collectstatic --noinput
python manage.py runserver
@bestlong
Copy link

bestlong commented Dec 9, 2017

Dockfile 還需要 EXPOSE 8000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment