mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-30 01:39:45 +03:00
cookiecutterdjango/base extracted from main Dockerfile, to speed-up building process
This commit is contained in:
parent
de9839f2db
commit
3bf346c0c1
|
@ -1,9 +1,4 @@
|
|||
FROM python:2.7
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y ruby-compass && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
FROM cookiecutterdjango/base
|
||||
|
||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||
ADD ./requirements /requirements
|
||||
|
@ -12,22 +7,6 @@ ADD ./requirements.txt /requirements.txt
|
|||
RUN pip install -r /requirements.txt
|
||||
RUN pip install -r /requirements/local.txt
|
||||
|
||||
# Install Node.js
|
||||
RUN cd /tmp && \
|
||||
wget http://nodejs.org/dist/node-latest.tar.gz && \
|
||||
tar xvzf node-latest.tar.gz && \
|
||||
rm -f node-latest.tar.gz && \
|
||||
cd node-v* && \
|
||||
./configure && \
|
||||
CXX="g++ -Wno-unused-local-typedefs" make && \
|
||||
CXX="g++ -Wno-unused-local-typedefs" make install && \
|
||||
cd /tmp && \
|
||||
rm -rf /tmp/node-v* && \
|
||||
npm install -g npm && \
|
||||
printf '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
|
||||
|
||||
RUN npm install -g grunt-cli
|
||||
|
||||
ADD . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
|
22
{{cookiecutter.repo_name}}/compose/base/Dockerfile
Normal file
22
{{cookiecutter.repo_name}}/compose/base/Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM python:2.7
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y ruby-compass && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Node.js
|
||||
RUN cd /tmp && \
|
||||
wget http://nodejs.org/dist/node-latest.tar.gz && \
|
||||
tar xvzf node-latest.tar.gz && \
|
||||
rm -f node-latest.tar.gz && \
|
||||
cd node-v* && \
|
||||
./configure && \
|
||||
CXX="g++ -Wno-unused-local-typedefs" make && \
|
||||
CXX="g++ -Wno-unused-local-typedefs" make install && \
|
||||
cd /tmp && \
|
||||
rm -rf /tmp/node-v* && \
|
||||
npm install -g npm && \
|
||||
printf '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
|
||||
|
||||
RUN npm install -g grunt-cli
|
|
@ -1,7 +1,9 @@
|
|||
FROM {{ cookiecutter.repo_name|replace('_', '') }}_django
|
||||
|
||||
# Install OpenSSH
|
||||
RUN apt-get -y install openssh-server
|
||||
RUN apt-get update && \
|
||||
apt-get -y install openssh-server && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# sshd needs this directory to run
|
||||
RUN mkdir -p /var/run/sshd
|
||||
|
|
Loading…
Reference in New Issue
Block a user