Greg-House commited on
Commit
9688473
·
verified ·
1 Parent(s): 8b98421

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -35
Dockerfile CHANGED
@@ -1,43 +1,19 @@
1
- FROM debian:stable-slim
2
 
3
- ENV DEBIAN_FRONTEND=noninteractive
 
 
4
 
5
- # Prevent HuggingFace from thinking the container is idle
6
- ENV HF_HUB_ENABLE_TELEMETRY=1
7
 
8
- RUN apt-get update && apt-get install -y \
9
- wget \
10
- supervisor \
11
- apache2 \
12
- libapache2-mod-php \
13
- 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 \
14
- gnupg ca-certificates \
15
- && rm -rf /var/lib/apt/lists/*
16
 
17
- # Install Nextcloud
18
- WORKDIR /var/www/html
19
- RUN wget https://download.nextcloud.com/server/releases/latest.tar.bz2 && \
20
- tar -xjf latest.tar.bz2 && rm latest.tar.bz2 && \
21
- chown -R www-data:www-data nextcloud
22
 
23
- # Change Apache port to 7890
24
- RUN sed -i 's/80/7890/g' /etc/apache2/ports.conf && \
25
- sed -i 's/<VirtualHost \*:80>/<VirtualHost \*:7890>/' /etc/apache2/sites-available/000-default.conf
26
-
27
- # Install Collabora CODE (minimal)
28
- RUN wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg && \
29
- cp collaboraonline-release-keyring.gpg /usr/share/keyrings/collaboraonline-release-keyring.gpg && \
30
- echo "deb [signed-by=/usr/share/keyrings/collaboraonline-release-keyring.gpg] https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb/ /" \
31
- > /etc/apt/sources.list.d/collabora.list && \
32
- apt-get update && apt-get install -y coolwsd code-brand && \
33
- rm -rf /var/lib/apt/lists/*
34
-
35
- # Disable SSL (Spaces blocks custom certs)
36
- RUN sed -i 's/ssl\.enable="true"/ssl.enable="false"/' /etc/coolwsd/coolwsd.xml
37
-
38
- # Supervisor config
39
- COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
40
 
41
  EXPOSE 7890 9980
42
 
43
- CMD ["/usr/bin/supervisord", "-n"]
 
1
+ FROM nixos/nix:latest AS builder
2
 
3
+ # Create image derivation
4
+ RUN mkdir /app
5
+ WORKDIR /app
6
 
7
+ COPY default.nix .
 
8
 
9
+ # Build Nix image
10
+ RUN nix-build default.nix -o image
 
 
 
 
 
 
11
 
12
+ # Final tiny image
13
+ FROM scratch
 
 
 
14
 
15
+ COPY --from=builder /app/image/ /
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  EXPOSE 7890 9980
18
 
19
+ ENTRYPOINT ["/init"]