From d2d64c7e140e4a38c0f29c5aae208965858d8c5f Mon Sep 17 00:00:00 2001 From: Andrey Fedoseev Date: Sat, 10 Feb 2018 13:40:47 -0800 Subject: [PATCH] Use pre-built docker image for development and CI --- .circleci/config.yml | 17 ++++------------- Dockerfile | 13 ++----------- Dockerfile-base | 12 ++++++++++++ requirements-test.txt | 1 + 4 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 Dockerfile-base diff --git a/.circleci/config.yml b/.circleci/config.yml index 8adcae0..d131372 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,21 +3,12 @@ jobs: build: working_directory: ~/django-static-precompiler docker: - - image: ubuntu:16.04 + - image: andreyfedoseev/django-static-precompiler steps: - - run: apt-get update && apt-get install -y python2.7-dev python3.5-dev python3-pip sqlite3 ruby-dev npm - - run: ln -s /usr/bin/nodejs /usr/local/bin/node - - run: npm install -g coffee-script@1.7.1 - - run: npm install -g livescript@1.4.0 - - run: npm install -g less@1.7.4 - - run: npm install -g babel-cli@6.2.0 - - run: npm install -g stylus@0.50.0 - - run: npm install -g handlebars@4.0.2 - - run: gem install sass -v 3.4.22 - - run: gem install compass -v 1.0.1 + - run: apt-get update && apt-get install -y python2.7-dev python3.5-dev python-pip sqlite3 - checkout - - run: pip3 install -r requirements-ci.txt - - run: pip3 install -e .[libsass] + - run: pip install -r requirements-ci.txt + - run: pip install -e .[libsass] - run: flake8 - run: rm -f coverage.xml - run: tox diff --git a/Dockerfile b/Dockerfile index 645779b..956ae28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,6 @@ -FROM ubuntu:16.04 +FROM andreyfedoseev/django-static-precompiler MAINTAINER Andrey Fedoseev -RUN apt-get update && apt-get install -y python2.7-dev python3.5-dev python-pip sqlite3 ruby-dev npm -RUN ln -s /usr/bin/nodejs /usr/local/bin/node -RUN npm install -g coffee-script@1.7.1 -RUN npm install -g livescript@1.4.0 -RUN npm install -g less@1.7.4 -RUN npm install -g babel-cli@6.2.0 -RUN npm install -g stylus@0.50.0 -RUN npm install -g handlebars@4.0.2 -RUN gem install sass -v 3.4.22 -RUN gem install compass -v 1.0.1 +RUN apt-get update && apt-get install -y python2.7-dev python3.5-dev python-pip sqlite3 RUN mkdir /app WORKDIR /app ADD requirements-*.txt /app/ diff --git a/Dockerfile-base b/Dockerfile-base new file mode 100644 index 0000000..f007c98 --- /dev/null +++ b/Dockerfile-base @@ -0,0 +1,12 @@ +FROM ubuntu:16.04 +MAINTAINER Andrey Fedoseev +RUN apt-get update && apt-get install -y autoconf libtool ruby-dev npm +RUN ln -s /usr/bin/nodejs /usr/local/bin/node +RUN npm install -g coffee-script@1.7.1 +RUN npm install -g livescript@1.4.0 +RUN npm install -g less@1.7.4 +RUN npm install -g babel-cli@6.2.0 +RUN npm install -g stylus@0.50.0 +RUN npm install -g handlebars@4.0.2 +RUN gem install sass -v 3.4.22 +RUN gem install compass -v 1.0.1 diff --git a/requirements-test.txt b/requirements-test.txt index fefaca6..67d2e96 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ +Django<2.0 pytest pytest-django==3.1.2 pretend