Update Dockerfile
Browse files- Dockerfile +4 -0
Dockerfile
CHANGED
|
@@ -4,6 +4,10 @@ FROM python:3.8-slim-buster
|
|
| 4 |
# Install MongoDB
|
| 5 |
RUN apt-get update && apt-get install -y mongodb
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the app code to the image
|
| 8 |
COPY . /app
|
| 9 |
WORKDIR /app
|
|
|
|
| 4 |
# Install MongoDB
|
| 5 |
RUN apt-get update && apt-get install -y mongodb
|
| 6 |
|
| 7 |
+
RUN mkdir -p /data/db
|
| 8 |
+
RUN chown -R mongodb:mongodb /data/db
|
| 9 |
+
RUN service mongodb start
|
| 10 |
+
|
| 11 |
# Copy the app code to the image
|
| 12 |
COPY . /app
|
| 13 |
WORKDIR /app
|