Skip to content

Commit

Permalink
Tighen Docker versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Firefishy committed Aug 18, 2023
1 parent 45a921b commit 843ae45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/php:8-apache
FROM docker.io/library/php:7-apache

# Use port 8080
RUN sed -i "s/80/8080/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
Expand All @@ -7,16 +7,18 @@ RUN sed -i "s/80/8080/g" /etc/apache2/sites-available/000-default.conf /etc/apac
RUN apt-get update && apt-get install -y \
libzip-dev \
zip \
&& docker-php-ext-install zip
&& docker-php-ext-install zip \
&& rm -rf /var/lib/apt/lists/*

# Install composer
COPY --from=docker.io/library/composer /usr/bin/composer /usr/bin/composer
COPY --from=docker.io/library/composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /var/www/html/
ADD . /var/www/html/

# Add user
RUN groupadd -r user && useradd -m -r -g user user
RUN mkdir -p /var/www/html/vendor && chown user:user /var/www/html/vendor
USER user

# Install composer dependencies
Expand Down

0 comments on commit 843ae45

Please sign in to comment.