Update Dockerfile
Browse files- Dockerfile +14 -12
Dockerfile
CHANGED
|
@@ -7,6 +7,7 @@ ENV LISTEN_PORT=5000
|
|
| 7 |
EXPOSE 5000
|
| 8 |
|
| 9 |
LABEL Maintainer="arts-of-coding"
|
|
|
|
| 10 |
|
| 11 |
WORKDIR /
|
| 12 |
|
|
@@ -28,33 +29,34 @@ RUN apt-get update \
|
|
| 28 |
&& apt-get install -y --no-install-recommends fuse blobfuse libcurl3-gnutls libgnutls30 \
|
| 29 |
&& rm -rf /var/lib/apt/lists/*
|
| 30 |
|
| 31 |
-
COPY mount-blobfuse.sh /
|
| 32 |
RUN chmod +x /mount-blobfuse.sh
|
| 33 |
#COPY --from=compiler /opt/venv/bin/activate /usr/local/bin/activate_venv
|
| 34 |
-
COPY /mount-blobfuse.sh /app/mount-blobfuse.sh
|
| 35 |
|
| 36 |
#ADD /data/ /app/data/
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
# Preset the volume change this to the actual azure folder
|
| 41 |
#VOLUME /dash_plotly_QC_scRNA/./data
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
COPY ./requirements.txt ./
|
| 46 |
-
RUN pip install --requirement ./requirements.txt
|
| 47 |
|
| 48 |
-
COPY ./dash_plotly_QC_scRNA.py ./
|
| 49 |
|
| 50 |
-
COPY ./main.py ./
|
| 51 |
|
| 52 |
-
|
| 53 |
-
USER user
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
# How the docker app will run
|
| 60 |
ENTRYPOINT ["/bin/bash", "-c", "/mount-blobfuse.sh; exec $SHELL"]
|
|
|
|
| 7 |
EXPOSE 5000
|
| 8 |
|
| 9 |
LABEL Maintainer="arts-of-coding"
|
| 10 |
+
RUN useradd -m -u 1000 user
|
| 11 |
|
| 12 |
WORKDIR /
|
| 13 |
|
|
|
|
| 29 |
&& apt-get install -y --no-install-recommends fuse blobfuse libcurl3-gnutls libgnutls30 \
|
| 30 |
&& rm -rf /var/lib/apt/lists/*
|
| 31 |
|
| 32 |
+
COPY --chown=user mount-blobfuse.sh /
|
| 33 |
RUN chmod +x /mount-blobfuse.sh
|
| 34 |
#COPY --from=compiler /opt/venv/bin/activate /usr/local/bin/activate_venv
|
| 35 |
+
COPY --chown=user /app/mount-blobfuse.sh /app/mount-blobfuse.sh
|
| 36 |
|
| 37 |
#ADD /data/ /app/data/
|
| 38 |
|
| 39 |
+
WORKDIR /app
|
| 40 |
|
| 41 |
# Preset the volume change this to the actual azure folder
|
| 42 |
#VOLUME /dash_plotly_QC_scRNA/./data
|
| 43 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 44 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 45 |
|
| 46 |
+
COPY --chown=user . /app
|
| 47 |
|
| 48 |
+
COPY --chown=user ./requirements.txt ./
|
|
|
|
| 49 |
|
| 50 |
+
COPY --chown=user ./dash_plotly_QC_scRNA.py ./
|
| 51 |
|
| 52 |
+
COPY --chown=user ./main.py ./
|
| 53 |
|
| 54 |
+
ADD --chown=user ./azure
|
|
|
|
| 55 |
|
| 56 |
+
USER user
|
| 57 |
|
| 58 |
+
ENV HOME=/home/user \
|
| 59 |
+
PATH=/home/user/.local/bin:$PATH
|
| 60 |
|
| 61 |
# How the docker app will run
|
| 62 |
ENTRYPOINT ["/bin/bash", "-c", "/mount-blobfuse.sh; exec $SHELL"]
|