Skip to content

Commit

Permalink
Add 8.0 versions of more recepies for the drone run of server master
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Nov 7, 2022
1 parent 5363c60 commit 717d263
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 0 deletions.
9 changes: 9 additions & 0 deletions acceptance-php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ghcr.io/nextcloud/continuous-integration-php8.0:latest

RUN apt-get update && apt-get install -y apache2 libapache2-mod-php8.0 && \
apt-get autoremove -y && apt-get autoclean && apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*

# /var/www/html has to be linked to the root directory of the Nextcloud server
# before the tests are run on Apache.
RUN rm -fr /var/www/html
8 changes: 8 additions & 0 deletions litmus-php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ghcr.io/nextcloud/continuous-integration-php8.0:latest

RUN apt-get update && apt-get install -y gcc coreutils make python && \
mkdir -p /tmp/litmus && \
wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz && \
cd /tmp/litmus && tar -xzf litmus-0.13.tar.gz && \
cd /tmp/litmus/litmus-0.13 && ./configure && make && rm -f /tmp/litmus-0.13.tar.gz && \
apt-get clean
10 changes: 10 additions & 0 deletions php8.0-memcached/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/nextcloud/continuous-integration-php8.0:latest
RUN apt-get update && \
apt-get purge -y php8.0-apcu && \
apt-get install -y php8.0-memcached memcached && \
update-rc.d memcached enable && \
apt-get autoremove -y && apt-get autoclean && apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*

ADD nextcloud.ini /etc/php/8.0/cli/conf.d/nextcloud.ini
ENTRYPOINT service memcached restart && bash
10 changes: 10 additions & 0 deletions php8.0-memcached/nextcloud.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#apc.enable_cli = 1
phar.readonly = 0 ; only for building phar files on CI - should be disabled on production environments
; Opcache
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
8 changes: 8 additions & 0 deletions samba-native-php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ghcr.io/nextcloud/continuous-integration-samba-non-native-php8.0:latest

RUN apt update
RUN apt-get install -y php7.4-dev libsmbclient-dev git
RUN git clone git://github.com/eduardok/libsmbclient-php.git
RUN cd libsmbclient-php && phpize && ./configure && make && make install

ADD smbclient.ini /etc/php/7.4/cli/conf.d/smbclient.ini
1 change: 1 addition & 0 deletions samba-native-php8.0/smbclient.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension="smbclient.so"
22 changes: 22 additions & 0 deletions samba-non-native-php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Based upon https://hub.docker.com/r/silvershell/samba/
FROM ghcr.io/nextcloud/continuous-integration-php8.0:latest

ENV SMB_USER smbuser
ENV SMB_PASSWORD smbpassword

RUN apt-get update

RUN apt-get install -y samba smbclient
RUN mkdir -p /opt/samba/share
RUN chmod 777 /opt/samba/share

RUN mkdir -p /opt/samba/user
RUN chmod 777 /opt/samba/user

RUN useradd -s /bin/false "$SMB_USER"
RUN (echo "$SMB_PASSWORD"; echo "$SMB_PASSWORD" ) | pdbedit -a -u "$SMB_USER"

EXPOSE 137/udp 138/udp 139 445

COPY smb.conf /etc/samba/smb.conf

46 changes: 46 additions & 0 deletions samba-non-native-php8.0/smb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[global]
security = user

load printers = no
printcap name = /dev/null
printing = bsd

unix charset = UTF-8
dos charset = CP932

workgroup = WORKGROUP

server string = %h server (Samba, Ubuntu)
dns proxy = no
interfaces = eth* lo
bind interfaces only = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = Bad User
usershare allow guests = yes

[public]
path = /opt/samba/share
writable = yes
printable = no
public = yes
guest only = yes
create mode = 0777
directory mode = 0777

[user]
path = /opt/samba/user
writable = yes
printable = no
public = no
create mode = 0777
directory mode = 0777
29 changes: 29 additions & 0 deletions webdav-apache-php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ghcr.io/nextcloud/continuous-integration-php8.0:latest

RUN apt-get update
RUN apt-get install -y apache2 apache2-utils
RUN a2enmod dav dav_fs
RUN a2dissite 000-default

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_RUN_DIR /var/run/apache2

RUN mkdir -p /var/lock/apache2; chown www-data /var/lock/apache2
RUN mkdir -p /var/webdav; chown www-data /var/webdav

ADD webdav.conf /etc/apache2/sites-available/webdav.conf
RUN a2ensite webdav

RUN htpasswd -cb /etc/apache2/webdav.password test pass
RUN chown root:www-data /etc/apache2/webdav.password
RUN chmod 640 /etc/apache2/webdav.password

RUN apt-get autoremove -y && \
apt-get autoclean && \
apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*

15 changes: 15 additions & 0 deletions webdav-apache-php8.0/webdav.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Alias /webdav /var/webdav/
<Location /webdav/>
DAV on
Options +Indexes
AuthType Basic
AuthName "webdav"
AuthUserFile /etc/apache2/webdav.password
Require valid-user
</Location>

<Directory /var/webdav/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

0 comments on commit 717d263

Please sign in to comment.