Skip to content

Instantly share code, notes, and snippets.

@mikebz
Last active October 2, 2017 04:27
Show Gist options
  • Save mikebz/53eac80130f126797088b435fcdf9d0e to your computer and use it in GitHub Desktop.
Save mikebz/53eac80130f126797088b435fcdf9d0e to your computer and use it in GitHub Desktop.
Dockerfile for Django, Python and Webpack static build
FROM python:3.6-slim
# install node
RUN apt-get -y update
RUN apt-get -y install curl
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get -y install nodejs
WORKDIR /app
ADD . /app
# install requirements for python and node
# compile them
RUN pip install -r requirements.txt
RUN npm install
RUN npm run build
EXPOSE 8000
ENV NAME DEBUG
CMD ["python", "manage.py", "runserver"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment