Re-sequence Dockerfile for quicker dev rebuilds

This is primarily a convenience for developers to improve iteration.

Change-Id: I7bfe7b6d37c128ef700a8a0e6656e7e139ad0582
This commit is contained in:
Mark Burnett 2018-02-15 13:57:31 -06:00
parent e0b04e829b
commit 1de365b3e0

View File

@ -6,28 +6,33 @@ ENV DEBIAN_FRONTEND noninteractive
ENV LANG=C.UTF-8 ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
COPY requirements.txt /tmp/ EXPOSE 8000
RUN pip3 install -r /tmp/requirements.txt
COPY . /armada ENTRYPOINT ["./entrypoint.sh"]
RUN apt-get update && \ CMD ["server"]
RUN mkdir -p /armada && \
apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
netbase \ netbase \
curl \ curl \
git && \ git && \
useradd -u 1000 -g users -d /armada armada && \ useradd -u 1000 -g users -d /armada armada && \
chown -R armada:users /armada && \
mv /armada/etc/armada /etc/ && \
cd /armada && \
python3 setup.py install && \
rm -rf \ rm -rf \
/root/.cache \ /root/.cache \
/var/lib/apt/lists/* /var/lib/apt/lists/*
EXPOSE 8000
USER armada
WORKDIR /armada WORKDIR /armada
ENTRYPOINT ["./entrypoint.sh"] COPY requirements.txt /tmp/
CMD ["server"] RUN pip3 install -r /tmp/requirements.txt
COPY . /armada
RUN \
mv /armada/etc/armada /etc/ && \
cd /armada && \
chown -R armada:users /armada && \
python3 setup.py install
USER armada