Skip to content

Commit 3327533

Browse files
committed
simplificando execucao do apache
1 parent 79282b0 commit 3327533

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ RUN echo "---> Adding Support for NewRelic" && \
4141
cp ./scripts/newrelic.ini.template /scripts/newrelic.ini && \
4242
mkdir /var/log/newrelic
4343

44-
RUN echo "---> Adding the runner user" && \
45-
adduser --disabled-password -u 1000 runner && \
46-
mkdir -p /var/www/html && \
47-
chown -R runner:runner /var/www/html && \
48-
wget -O /tini https://github.com/krallin/tini/releases/download/v0.16.1/tini-static && \
44+
RUN echo "---> Adding Tini" && \
45+
wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
4946
chmod +x /tini
5047

5148
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
@@ -57,10 +54,12 @@ COPY apache-run.sh /usr/bin/apache-run
5754

5855
RUN chmod a+x /usr/bin/apache-run
5956

60-
USER runner
57+
USER www-data
6158

6259
WORKDIR "/var/www/html"
6360

6461
EXPOSE 8080 9001
6562

66-
ENTRYPOINT ["/tini", "--", "/usr/bin/apache-run"]
63+
ENTRYPOINT ["/tini", "--"]
64+
65+
CMD ["/usr/bin/apache-run"]

apache-run.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,4 @@ if [[ $SESSION_HANDLER == true ]]; then
1616
echo "session.save_path = $SESSION_HANDLER_PATH" >> /usr/local/etc/php/conf.d/session-handler.ini
1717
fi
1818

19-
composer install && rm -rf var/cache/* var/logs/* \
20-
&& mkdir -p /var/www/html/var/cache \
21-
&& mkdir -p /var/www/html/var/logs \
22-
&& mkdir -p /var/www/html/var/sessions \
23-
&& chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache \
24-
&& chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs \
25-
&& chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions \
26-
&& apache2-foreground
19+
apache2-foreground

0 commit comments

Comments
 (0)