Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +4 -9
Dockerfile
CHANGED
|
@@ -10,8 +10,6 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 10 |
# Create a non-root user
|
| 11 |
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
|
| 12 |
|
| 13 |
-
RUN rm -rf /app && mkdir -p /app
|
| 14 |
-
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
# Install git + ssh utilities
|
|
@@ -41,11 +39,8 @@ RUN mkdir -p /root/.ssh && \
|
|
| 41 |
chmod 600 /root/.ssh/id_rsa && \
|
| 42 |
ssh-keyscan github.com >> /root/.ssh/known_hosts
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
echo "== First lines of key ==" && head -n 5 /root/.ssh/id_rsa && \
|
| 47 |
-
echo "== Line count ==" && wc -l /root/.ssh/id_rsa && \
|
| 48 |
-
echo "== Key validity test ==" && (ssh-keygen -y -f /root/.ssh/id_rsa > /dev/null && echo "VALID KEY" || echo "INVALID KEY")
|
| 49 |
|
| 50 |
# Clone your private repo
|
| 51 |
RUN git clone git@github.com:Sisyetad/problemsolution.git .
|
|
@@ -57,8 +52,8 @@ COPY --chown=appuser:appgroup . .
|
|
| 57 |
|
| 58 |
USER appuser
|
| 59 |
|
| 60 |
-
RUN chmod +x /
|
| 61 |
|
| 62 |
EXPOSE 8000
|
| 63 |
|
| 64 |
-
CMD ["sh", "/
|
|
|
|
| 10 |
# Create a non-root user
|
| 11 |
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
|
| 12 |
|
|
|
|
|
|
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
# Install git + ssh utilities
|
|
|
|
| 39 |
chmod 600 /root/.ssh/id_rsa && \
|
| 40 |
ssh-keyscan github.com >> /root/.ssh/known_hosts
|
| 41 |
|
| 42 |
+
RUN mkdir -p /workspace
|
| 43 |
+
WORKDIR /workspace
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# Clone your private repo
|
| 46 |
RUN git clone git@github.com:Sisyetad/problemsolution.git .
|
|
|
|
| 52 |
|
| 53 |
USER appuser
|
| 54 |
|
| 55 |
+
RUN chmod +x /workspace/problemsolution/entrypoint.sh
|
| 56 |
|
| 57 |
EXPOSE 8000
|
| 58 |
|
| 59 |
+
CMD ["sh", "/workspace/problemsolution/entrypoint.sh"]
|