Skip to content

Commit 2112c21

Browse files
committed
- updated docker image to latest code and php 8.4
1 parent 0d89549 commit 2112c21

File tree

3 files changed

+172
-2
lines changed

3 files changed

+172
-2
lines changed

docker/2404/Dockerfile

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
FROM phusion/baseimage:noble-1.0.1
2+
MAINTAINER Matthew Rayner <hello@rayner.io>
3+
ENV REFRESHED_AT 2025-04-02
4+
5+
# based on dgraziotin/lamp
6+
# MAINTAINER Daniel Graziotin <daniel@ineed.coffee>
7+
8+
ENV DOCKER_USER_ID 501
9+
ENV DOCKER_USER_GID 20
10+
11+
ENV BOOT2DOCKER_ID 1000
12+
ENV BOOT2DOCKER_GID 50
13+
14+
ENV PHPMYADMIN_VERSION=4.9.0.1
15+
16+
# RipRunner Environment variables - START
17+
ENV APP_DSN mysql:host=localhost;dbname=riprunner
18+
# RipRunner Environment variables - END
19+
20+
WORKDIR /
21+
# Use baseimage-docker's init system.
22+
CMD ["/sbin/my_init"]
23+
24+
# Tweaks to give Apache/PHP write permissions to the app
25+
#RUN usermod -u ${BOOT2DOCKER_ID} www-data && \
26+
# usermod -G staff www-data && \
27+
# useradd -r mysql && \
28+
# usermod -G staff mysql
29+
RUN usermod -G staff www-data && \
30+
useradd -r mysql && \
31+
usermod -G staff mysql
32+
33+
RUN groupmod -g $(($BOOT2DOCKER_GID + 10000)) $(getent group $BOOT2DOCKER_GID | cut -d: -f1)
34+
RUN groupmod -g ${BOOT2DOCKER_GID} staff
35+
36+
# Install packages
37+
ENV DEBIAN_FRONTEND noninteractive
38+
RUN add-apt-repository -y ppa:ondrej/php && \
39+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \
40+
apt-get update && \
41+
apt-get -y upgrade && \
42+
apt-get -y install supervisor wget git apache2 php-xdebug libapache2-mod-php mysql-server php-mysql pwgen php-apcu php8.4-mcrypt php-gd php-xml php-mbstring zip unzip php-zip curl php-curl && \
43+
apt-get -y autoremove && \
44+
echo "ServerName localhost" >> /etc/apache2/apache2.conf
45+
46+
# needed for phpMyAdmin
47+
#RUN ln -s /etc/php/8.3/mods-available/mcrypt.ini /etc/php/8.3/mods-available/ && phpenmod mcrypt
48+
49+
# Add image configuration and scripts
50+
ADD /docker/supporting_files/start-apache2.sh /start-apache2.sh
51+
ADD /docker/supporting_files/start-mysqld.sh /start-mysqld.sh
52+
ADD /docker/supporting_files/run.sh /run.sh
53+
RUN chmod 755 /*.sh
54+
ADD /docker/supporting_files/supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
55+
ADD /docker/supporting_files/supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf
56+
ADD /docker/supporting_files/mysqld_innodb.cnf /etc/mysql/conf.d/mysqld_innodb.cnf
57+
58+
# Allow mysql to bind on 0.0.0.0
59+
RUN sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf && \
60+
sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
61+
62+
# Set PHP timezones to Europe/London
63+
RUN sed -i "s/;date.timezone =/date.timezone = Europe\/London/g" /etc/php/8.4/apache2/php.ini
64+
RUN sed -i "s/;date.timezone =/date.timezone = Europe\/London/g" /etc/php/8.4/cli/php.ini
65+
66+
# Remove pre-installed database
67+
RUN rm -rf /var/lib/mysql
68+
69+
# Add MySQL utils
70+
ADD /docker/supporting_files/create_mysql_users.sh /create_mysql_users.sh
71+
RUN chmod 755 /*.sh
72+
73+
# Add RipRunner scripts
74+
ADD /docker/supporting_files/create_riprunner_db.sh /create_riprunner_db.sh
75+
RUN chmod 755 /*.sh
76+
77+
# Add phpmyadmin
78+
RUN wget -O /tmp/phpmyadmin.tar.gz https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-all-languages.tar.gz
79+
RUN tar xfvz /tmp/phpmyadmin.tar.gz -C /var/www
80+
RUN ln -s /var/www/phpMyAdmin-${PHPMYADMIN_VERSION}-all-languages /var/www/phpmyadmin
81+
RUN mv /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php
82+
83+
# Add composer
84+
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
85+
php composer-setup.php && \
86+
php -r "unlink('composer-setup.php');" && \
87+
mv composer.phar /usr/local/bin/composer
88+
89+
ENV MYSQL_PASS:-$(pwgen -s 12 1)
90+
# config to enable .htaccess
91+
ADD /docker/supporting_files/apache_default /etc/apache2/sites-available/000-default.conf
92+
RUN a2enmod rewrite
93+
94+
# Configure /app folder with riprunner app
95+
RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
96+
ADD /docker/app/ /app
97+
98+
# Remove temp app files
99+
RUN rm -rf /app/temp/cache
100+
RUN rm -rf /app/temp/twig
101+
102+
ADD /*.php /app/
103+
ADD /*.json /app/
104+
ADD /*.lock /app/
105+
ADD /*.xml /app/
106+
ADD /*.sql /app/
107+
ADD /.check_version /app/
108+
ADD /.htaccess /app/
109+
ADD /angular-services/ /app/angular-services
110+
ADD /apk/ /app/apk
111+
ADD /authentication/ /app/authentication
112+
ADD /cache/ /app/cache
113+
ADD /config/ /app/config
114+
ADD /controllers/ /app/controllers
115+
ADD /core/ /app/core
116+
ADD /data/ /app/data
117+
ADD /db/ /app/db
118+
ADD /fcm/ /app/fcm
119+
ADD /gcm/ /app/gcm
120+
ADD /googleae/ /app/googleae
121+
ADD /images/ /app/images
122+
ADD /js/ /app/js
123+
ADD /kml/ /app/kml
124+
ADD /ldap/ /app/ldap
125+
ADD /models/ /app/models
126+
ADD /ngui/ /app/ngui
127+
ADD /plugins/ /app/plugins
128+
ADD /rest/ /app/rest
129+
ADD /secrets/config-secrets-default.json /app/secrets/config-secrets.json
130+
ADD /signals/ /app/signals
131+
ADD /sounds/ /app/sounds/
132+
ADD /sql/ /app/sql
133+
ADD /styles/ /app/styles
134+
#ADD /tests/ /app/tests
135+
ADD /url/ /app/url
136+
ADD /views/ /app/views
137+
ADD /webhooks/ /app/webhooks
138+
139+
ADD /docker/app_config/ /app
140+
141+
# Install php app dependencies
142+
ENV COMPOSER_ALLOW_SUPERUSER 1
143+
# RUN composer update --no-dev --prefer-dist --no-interaction --optimize-autoloader --working-dir app/
144+
RUN composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader --working-dir app/
145+
146+
#Environment variables to configure php
147+
ENV PHP_UPLOAD_MAX_FILESIZE 10M
148+
ENV PHP_POST_MAX_SIZE 10M
149+
150+
# Add volumes for the app and MySql
151+
#VOLUME ["/etc/mysql", "/var/lib/mysql", "/app" ]
152+
VOLUME ["/etc/mysql", "/var/lib/mysql" ]
153+
154+
EXPOSE 80 3306
155+
CMD ["/run.sh"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
**/.git
2+
**/.gitignore
3+
**/CHANGELOG*
4+
**/circle.yml
5+
**/docker-compose.test.yml
6+
docs/
7+
tests/
8+
**/LICENSE
9+
**/README*
10+
**/android-error-softhaus.php
11+
**/flash-eol-ee-config.php
12+
**/Dockerfile*
13+
**/logo.png
14+
**/riprunner-svvfd-*
15+

docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
riprunner is a docker image that include the Docker-Lamp baseimage (Ubuntu 22.04), along with a LAMP stack ([Apache][apache], [MySQL][mysql] and [PHP][php]) all in one handy package.
1+
riprunner is a docker image that include the Docker-Lamp baseimage (Ubuntu 24.04), along with a LAMP stack ([Apache][apache], [MySQL][mysql] and [PHP][php]) all in one handy package.
22

3-
1. With Ubuntu **22.04** image on the `latest-2204`, riprunner is ready to test the Rip Runner communication suite.
3+
1. With Ubuntu **24.04** image on the `latest-2404`, riprunner is ready to test the Rip Runner communication suite.
44

55
# To build a new docker image
66
sudo docker build -t=softcoder/riprunner:latest -f ./docker/2204/Dockerfile .

0 commit comments

Comments
 (0)