Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- 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 |
-
#
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|