NicheBean commited on
Commit
fd76ac5
·
verified ·
1 Parent(s): d1f86c2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -6
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use the latest Ubuntu image
2
  FROM ubuntu:latest
3
 
4
  # Install required packages
@@ -9,14 +9,27 @@ RUN apt-get update && apt-get install -y \
9
  ca-certificates \
10
  sudo \
11
  git \
12
- apache2-utils && \
 
 
 
 
13
  apt-get clean # Clean up unnecessary cache files
14
 
15
  # Expose the necessary ports for Webtop
16
  EXPOSE 8080
17
 
18
- # Install Webtop using the script
19
- RUN curl -fsSL https://webtop.dev/install.sh | sh
 
20
 
21
- # Start Webtop without authentication
22
- CMD webtop start
 
 
 
 
 
 
 
 
 
1
+ # # Use the latest Ubuntu image
2
  FROM ubuntu:latest
3
 
4
  # Install required packages
 
9
  ca-certificates \
10
  sudo \
11
  git \
12
+ apache2-utils \
13
+ build-essential \
14
+ cmake \
15
+ libssl-dev \
16
+ libboost-all-dev && \
17
  apt-get clean # Clean up unnecessary cache files
18
 
19
  # Expose the necessary ports for Webtop
20
  EXPOSE 8080
21
 
22
+ # Set environment variables for authentication
23
+ ENV WEBTOP_USERNAME=admin
24
+ ENV WEBTOP_PASSWORD=secretpassword
25
 
26
+ # Create a .htpasswd file with basic authentication credentials
27
+ RUN htpasswd -cb /etc/apache2/.htpasswd $WEBTOP_USERNAME $WEBTOP_PASSWORD
28
+
29
+ # Clone and install Webtop from GitHub
30
+ RUN git clone https://github.com/webtop-project/webtop.git /opt/webtop && \
31
+ cd /opt/webtop && \
32
+ ./install.sh
33
+
34
+ # Start Webtop with authentication
35
+ CMD /opt/webtop/webtop start --auth /etc/apache2/.htpasswd