Skip to content

Commit

Permalink
Merge pull request #2054 from nodiscc/docker-alpine-318
Browse files Browse the repository at this point in the history
docker: update base Alpine Linux image to v3.18.5 (PHP 8.2)
  • Loading branch information
nodiscc authored Dec 5, 2023
2 parents 1d20124 + 07c31aa commit e763a37
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .docker/services.d/php-fpm/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/execlineb -P
php-fpm8 -F
php-fpm82 -F
48 changes: 24 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Stage 1:
# - Copy Shaarli sources
# - Build documentation
FROM python:3-alpine as docs
FROM docker.io/python:3-alpine as docs
ADD . /usr/src/app/shaarli
RUN cd /usr/src/app/shaarli \
&& apk add --no-cache gcc musl-dev make bash \
&& make htmldoc

# Stage 2:
# - Resolve PHP dependencies with Composer
FROM composer:latest as composer
FROM docker.io/composer:latest as composer
COPY --from=docs /usr/src/app/shaarli /app/shaarli
RUN cd shaarli \
&& composer --prefer-dist --no-dev install

# Stage 3:
# - Frontend dependencies
FROM node:12-alpine as node
FROM docker.io/node:12-alpine as node
COPY --from=composer /app/shaarli shaarli
RUN cd shaarli \
&& yarnpkg install \
Expand All @@ -25,37 +25,37 @@ RUN cd shaarli \

# Stage 4:
# - Shaarli image
FROM alpine:3.16.8
FROM docker.io/alpine:3.18.5
LABEL maintainer="Shaarli Community"

RUN apk --update --no-cache add \
ca-certificates \
nginx \
php8 \
php8-ctype \
php8-curl \
php8-fpm \
php8-gd \
php8-gettext \
php8-iconv \
php8-intl \
php8-json \
php8-ldap \
php8-mbstring \
php8-openssl \
php8-session \
php8-xml \
php8-simplexml \
php8-zlib \
php82 \
php82-ctype \
php82-curl \
php82-fpm \
php82-gd \
php82-gettext \
php82-iconv \
php82-intl \
php82-json \
php82-ldap \
php82-mbstring \
php82-openssl \
php82-session \
php82-xml \
php82-simplexml \
php82-zlib \
s6

COPY .docker/nginx.conf /etc/nginx/nginx.conf
COPY .docker/php-fpm.conf /etc/php8/php-fpm.conf
COPY .docker/php-fpm.conf /etc/php82/php-fpm.conf
COPY .docker/services.d /etc/services.d

RUN rm -rf /etc/php8/php-fpm.d/www.conf \
&& sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php8/php.ini \
&& sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php8/php.ini
RUN rm -rf /etc/php82/php-fpm.d/www.conf \
&& sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php82/php.ini \
&& sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php82/php.ini


WORKDIR /var/www
Expand Down
2 changes: 1 addition & 1 deletion doc/md/dev/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Unit tests can be run inside [Docker](../Docker.md) containers.

Test Dockerfiles are located under `tests/docker/<distribution>/Dockerfile`, and can be used to build Docker images to run Shaarli test suites under commonLinux environments. Dockerfiles are provided for the following environments:

- [`alpine316`](https://github.com/shaarli/Shaarli/blob/master/tests/docker/alpine316/Dockerfile) - [Alpine Linux 3.16](https://www.alpinelinux.org/downloads/)
- [`alpine318`](https://github.com/shaarli/Shaarli/blob/master/tests/docker/alpine318/Dockerfile) - [Alpine Linux 3.18](https://www.alpinelinux.org/downloads/)
- [`debian8`](https://github.com/shaarli/Shaarli/blob/master/tests/docker/debian8/Dockerfile) - [Debian 8 Jessie](https://wiki.debian.org/DebianJessie) (oldoldstable)
- [`debian9`](https://github.com/shaarli/Shaarli/blob/master/tests/docker/debian9/Dockerfile) - [Debian 9 Stretch](https://wiki.debian.org/DebianStretch) (oldstable)
- [`ubuntu16`](https://github.com/shaarli/Shaarli/blob/master/tests/docker/ubuntu16/Dockerfile) - [Ubuntu 16.04 Xenial Xerus](https://releases.ubuntu.com/16.04/) (old LTS)
Expand Down
36 changes: 0 additions & 36 deletions tests/docker/alpine316/Dockerfile

This file was deleted.

36 changes: 36 additions & 0 deletions tests/docker/alpine318/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM docker.io/alpine:3.18
MAINTAINER Shaarli Community

RUN apk --update --no-cache add \
ca-certificates \
curl \
make \
php82 \
php82-ctype \
php82-curl \
php82-dom \
php82-gd \
php82-gettext \
php82-iconv \
php82-intl \
php82-json \
php82-mbstring \
php82-openssl \
php82-phar \
php82-session \
php82-simplexml \
php82-tokenizer \
php82-xdebug \
php82-xmlwriter \
php82-xml \
php82-zlib \
rsync

RUN curl -sS https://getcomposer.org/installer | php82 -- --install-dir=/usr/local/bin --filename=composer

RUN mkdir /shaarli
WORKDIR /shaarli
VOLUME /shaarli

ENTRYPOINT ["make"]
CMD []
2 changes: 1 addition & 1 deletion tests/docker/debian8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:jessie
FROM docker.io/debian:jessie
MAINTAINER Shaarli Community

ENV TERM dumb
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/debian9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stretch
FROM docker.io/debian:stretch
MAINTAINER Shaarli Community

ENV TERM dumb
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/ubuntu16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM docker.io/ubuntu:16.04
MAINTAINER Shaarli Community

ENV TERM dumb
Expand Down

0 comments on commit e763a37

Please sign in to comment.