Updating docker dev workflow

* Moving to new docker compose file format
* Adding some things that will be needed for python dependencies
This commit is contained in:
Matthew Jones 2016-06-08 12:25:14 -04:00
parent d29889a4bc
commit 20fe9e9614
3 changed files with 49 additions and 28 deletions

View File

@ -1,26 +1,37 @@
tower:
build: ./docker-compose
ports:
- "8080:8080"
- "8013:8013"
links:
- postgres
- redis
- graphite
volumes:
- ../:/tower_devel
postgres:
image: postgres:9.4.1
# ports:
# - 5432:5432
redis:
image: redis:3.0.1
# ports:
# - 6379:6379
graphite:
image: hopsoft/graphite-statsd
ports:
- "8001:80"
- "2003:2003"
- "8125:8125/udp"
- "8126:8126"
version: '2'
services:
# Primary Tower Development Container
tower:
build: ./docker-compose
ports:
- "8080:8080"
- "8013:8013"
links:
- postgres
- redis
# - sync
# volumes_from:
# - sync
volumes:
- "../:/tower_devel"
# Postgres Database Container
postgres:
image: postgres:9.4.1
# Redis Container
redis:
image: redis:3.0.1
# Source Code Synchronization Container
# sync:
# build:
# context: ./docker-compose
# dockerfile: Dockerfile-sync
# command: "lsyncd -delay 1 -nodaemon -rsync /src /tower_devel"
# volumes:
# - /tower_devel
# - "../:/src"
# working_dir: /src
# stdin_open: true
# tty: true

View File

@ -7,11 +7,11 @@ ENV LC_ALL en_US.UTF-8
RUN apt-get update && apt-get install -y software-properties-common python-software-properties curl
RUN add-apt-repository -y ppa:chris-lea/redis-server; add-apt-repository -y ppa:chris-lea/zeromq; add-apt-repository -y ppa:chris-lea/node.js; add-apt-repository -y ppa:ansible/ansible; add-apt-repository -y ppa:jal233/proot;
RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash -
# TODO: I don't think we need this next line, it's the mongo package key
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | tee /etc/apt/sources.list.d/postgres-9.4.list
RUN apt-get update
RUN apt-get install -y openssh-server ansible mg vim tmux git mercurial subversion python-dev python-psycopg2 make postgresql-client libpq-dev nodejs python-psutil libxml2-dev libxslt-dev lib32z1-dev libsasl2-dev libldap2-dev libffi-dev libzmq-dev proot python-pip libxmlsec1-dev swig redis-server && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y openssh-server ansible mg vim tmux git mercurial subversion python-dev python-psycopg2 make postgresql-client libpq-dev nodejs python-psutil libxml2-dev libxslt-dev lib32z1-dev libsasl2-dev libldap2-dev libffi-dev libzmq-dev proot python-pip libxmlsec1-dev swig redis-server libgss-dev libkrb5-dev && apt-get autoremove --purge -y && rm -rf /var/lib/apt/lists/*
RUN pip install flake8 pytest pytest-pythonpath pytest-django pytest-cov pytest-mock dateutils django-debug-toolbar==1.4 pyflakes==1.0.0 virtualenv
RUN /usr/bin/ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa
RUN mkdir -p /etc/tower

View File

@ -0,0 +1,10 @@
FROM ubuntu:16.04
RUN PACKAGES="\
rsync \
lsyncd \
" && \
apt-get update && \
apt-get install -y $PACKAGES && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*