Greg-House commited on
Commit
90edd4e
·
verified ·
1 Parent(s): 54293b8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +50 -0
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ # --- Update Base ---
6
+ RUN apt-get update && apt-get install -y \
7
+ apt-transport-https \
8
+ ca-certificates \
9
+ gnupg \
10
+ wget \
11
+ software-properties-common \
12
+ supervisor \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # --- Install Apache + PHP for Nextcloud ---
16
+ RUN apt-get update && apt-get install -y \
17
+ apache2 \
18
+ libapache2-mod-php \
19
+ php php-gd php-mbstring php-xml php-zip php-curl php-intl php-mysql php-bz2 php-imagick php-gmp php-json php-ldap \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # --- Download Nextcloud ---
23
+ WORKDIR /var/www/html
24
+ RUN wget https://download.nextcloud.com/server/releases/latest.tar.bz2 && \
25
+ tar -xjf latest.tar.bz2 && \
26
+ rm latest.tar.bz2 && \
27
+ chown -R www-data:www-data nextcloud
28
+
29
+ # Change Apache port to 7890
30
+ RUN sed -i 's/80/7890/g' /etc/apache2/ports.conf && \
31
+ sed -i 's/<VirtualHost \*:80>/<VirtualHost \*:7890>/' /etc/apache2/sites-available/000-default.conf
32
+
33
+ # --- Install Collabora CODE ---
34
+ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7A4D1868 && \
35
+ echo "deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb/ /" \
36
+ > /etc/apt/sources.list.d/collabora.list && \
37
+ apt-get update && apt-get install -y code-brand code \
38
+ && rm -rf /var/lib/apt/lists/*
39
+
40
+ # Collabora default config
41
+ RUN sed -i 's/0.0.0.0:9980/0.0.0.0:9980/' /etc/collabora-online/coolwsd.xml
42
+
43
+ # --- Supervisor Config ---
44
+ RUN mkdir -p /var/log/supervisor
45
+
46
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
47
+
48
+ EXPOSE 7890 9980
49
+
50
+ CMD ["/usr/bin/supervisord", "-n"]