You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
FROM python:3.4.5
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
RUN mkdir /code
|
|
WORKDIR /code
|
|
|
|
RUN apt-get update && apt-get install -y supervisor \
|
|
cron
|
|
|
|
#RUN pip install mercurial
|
|
#RUN pip install git
|
|
RUN pip install uwsgi
|
|
#RUN apt-get update && apt-get install openssh-client
|
|
|
|
ARG SSH_PRIVATE_KEY
|
|
ARG SPICYCODE_LOGIN
|
|
ARG SPICYCODE_PASS
|
|
RUN echo '[auth]\nspicy.prefix = code.spicycms.com\nspicy.username = '$SPICYCODE_LOGIN'\nspicy.password = '$SPICYCODE_PASS'\nspicy.schemes = https' > ~/.hgrc
|
|
|
|
RUN mkdir -p ~/.ssh
|
|
RUN mkdir -p /code/static/img/avs
|
|
#RUN eval `ssh-agent -s` > /dev/null | echo "$SSH_KEY" | ssh-add -
|
|
RUN echo "$SSH_PRIVATE_KEY" >> /root/.ssh/id_rsa
|
|
RUN echo "Host *\n\tStrictHostKeyChecking no\nIdentityFile /root/.ssh/id_rsa" >> /root/.ssh/config
|
|
RUN chmod 600 -R /root/.ssh
|
|
|
|
#ADD ./requirements.txt /code/requirements.txt
|
|
#RUN pip install -r requirements.txt
|
|
|
|
RUN rm /root/.ssh/id_rsa
|
|
|
|
ADD . /code
|
|
RUN cp id_rsa /root/.ssh/
|
|
|
|
run ln -s /code/supervisor-app.conf /etc/supervisor/conf.d/
|
|
RUN pip install -r requirements.txt
|
|
#RUN python manage.py collectstatic --noinput
|
|
|
|
#CMD ["/code/docker-entrypoint.sh"]
|
|
CMD ["supervisord", "-n"]
|
|
|