Spaces:
Building
Building
Amansoni7477030
commited on
Update Dockerfile
Browse files- Dockerfile +16 -10
Dockerfile
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
-
|
2 |
-
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Build the image with caching
|
9 |
-
docker build \
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
1 |
+
# Use a base image
|
2 |
+
FROM ubuntu:latest
|
3 |
|
4 |
+
# Enable BuildKit in Docker
|
5 |
+
ENV DOCKER_BUILDKIT=1
|
6 |
+
ENV COMPOSE_DOCKER_CLI_BUILD=1
|
7 |
+
|
8 |
+
# Set bash shell and exit on error
|
9 |
+
RUN set -e && \
|
10 |
+
echo "Running shell script with error handling"
|
11 |
|
12 |
# Build the image with caching
|
13 |
+
RUN docker build \
|
14 |
+
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
15 |
+
--cache-from type=registry,ref=user/dify:cache \
|
16 |
+
--cache-to type=registry,ref=user/dify:cache,mode=max \
|
17 |
+
-t dify .
|
18 |
+
|
19 |
+
# Other necessary instructions here
|