mikmc5 commited on
Commit
461052e
·
verified ·
1 Parent(s): 0f349c0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -10
Dockerfile CHANGED
@@ -1,14 +1,29 @@
1
- # Use official Python image as base
2
- FROM python:3.9-slim
3
 
4
- # Set the working directory
5
- WORKDIR /app
6
 
7
- # Copy the application files into the container
8
- COPY . /app
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
12
 
13
- # Set the command to run the app
14
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Docker's official DinD image
2
+ FROM docker:20.10.7-dind
3
 
4
+ # Set the environment variables for Docker
5
+ ENV DOCKER_TLS_CERTDIR=/certs
6
 
7
+ # Create the necessary directories
8
+ RUN mkdir -p /certs/client
9
 
10
+ # Install any additional packages or dependencies
11
+ RUN apk add --no-cache \
12
+ bash \
13
+ curl \
14
+ git \
15
+ && rm -rf /var/cache/apk/*
16
 
17
+ # Set permissions to ensure Docker can operate properly inside the container
18
+ # This grants Docker the necessary permissions to run as expected.
19
+ RUN chmod 666 /var/run/docker.sock \
20
+ && chown root:root /var/run/docker.sock
21
+
22
+ # Expose the Docker socket to enable communication with Docker daemon
23
+ VOLUME /var/run/docker.sock:/var/run/docker.sock
24
+
25
+ # Set up the entrypoint
26
+ ENTRYPOINT ["dockerd-entrypoint.sh"]
27
+
28
+ # Start the Docker daemon
29
+ CMD ["dockerd"]