Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +25 -10
Dockerfile
CHANGED
|
@@ -1,14 +1,29 @@
|
|
| 1 |
-
# Use official
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
# Set the
|
| 5 |
-
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
|
| 10 |
-
# Install dependencies
|
| 11 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
# Set
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|