-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile.j2
More file actions
49 lines (36 loc) · 1.69 KB
/
Dockerfile.j2
File metadata and controls
49 lines (36 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# syntax=docker/dockerfile:1
# Dify AgentBox - All-in-one Development Environment
# Generated from Dockerfile.j2
# Base: {{ base.image }}
FROM {{ base.image }}
SHELL ["/bin/bash", "-c"]
# Prevent interactive prompts and set locale
ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PATH=/usr/local/go/bin:/opt/conda/bin:/usr/local/bin:/usr/bin:/bin:$PATH
# ============================================================================
# Install all dependencies and configure system (single RUN layer)
# ============================================================================
{{ install_script }}
# ============================================================================
# Environment variables
# ============================================================================
ENV GOPATH=/home/{{ user.name }}/go \
GOBIN=/home/{{ user.name }}/go/bin \
PLAYWRIGHT_BROWSERS_PATH=/opt/playwright-browsers \
PATH=/opt/conda/bin:/usr/local/go/bin:/home/{{ user.name }}/.cargo/bin:/home/{{ user.name }}/go/bin:$PATH
# ============================================================================
# Configure user environment
# ============================================================================
USER {{ user.name }}
{{ configure_user_script }}
# ============================================================================
# Final configuration
# ============================================================================
WORKDIR {{ workdir }}
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python --version && node --version && go version && ruby --version && rustc --version
# Default command
CMD ["/bin/bash"]