mfoud444 commited on
Commit
c59a109
·
verified ·
1 Parent(s): b97c873

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -12
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Update package lists and install necessary packages
6
  RUN apt-get update && apt-get install -y \
7
  curl \
8
  iproute2 \
@@ -11,17 +11,11 @@ RUN apt-get update && apt-get install -y \
11
  lsb-release \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Install Docker
15
- RUN mkdir -p /etc/apt/keyrings && \
16
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
17
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \
18
- apt-get update && \
19
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
20
-
21
- # Install Dokploy (without trying to initialize Swarm during build)
22
- RUN curl -sSL https://dokploy.com/install.sh | sh -s -- --skip-swarm
23
 
24
  EXPOSE 3000
25
 
26
- # Command to run when the container starts
27
- CMD ["bash"]
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Install prerequisites
6
  RUN apt-get update && apt-get install -y \
7
  curl \
8
  iproute2 \
 
11
  lsb-release \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Download the installer but don't run it yet
15
+ RUN curl -sSL https://dokploy.com/install.sh -o /install-dokploy.sh && \
16
+ chmod +x /install-dokploy.sh
 
 
 
 
 
 
17
 
18
  EXPOSE 3000
19
 
20
+ # Command that will start Docker and then run the installer
21
+ CMD ["bash", "-c", "dockerd & while ! docker info >/dev/null 2>&1; do sleep 1; done && /install-dokploy.sh && tail -f /dev/null"]