Skip to content

Commit

Permalink
Bump dependency versions at app and Dockerfile levels
Browse files Browse the repository at this point in the history
Also updates copyright year to auto-update
  • Loading branch information
iansltx committed Sep 12, 2018
1 parent c843880 commit 0a6e320
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 38 deletions.
19 changes: 9 additions & 10 deletions Dockerfile
@@ -1,34 +1,33 @@
FROM alpine:edge
FROM alpine:3.8

# install packages
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk add --update curl php7.1-config@testing php7.1-curl@testing php7.1-phar@testing php7.1-mbstring@testing \
php7.1-pcntl@testing php7.1-json@testing php7.1-opcache@testing php7.1-fpm@testing php7.1@testing php7.1-openssl@testing \
php7.1-pdo_mysql@testing openssl nginx runit@testing && rm -rf /var/cache/apk/*
RUN apk add --no-cache curl php php-common php-curl php-phar php-mbstring \
php-pcntl php-json php-opcache php-fpm php php-openssl php-dom php-xml \
php-pdo_mysql openssl nginx runit

# Install Composer
RUN curl https://getcomposer.org/composer.phar > /usr/sbin/composer

# Copy configs
COPY container/php.ini /etc/php7.1/php.ini
COPY container/php.ini /etc/php7/php.ini
COPY container/nginx.conf /etc/nginx/nginx.conf
COPY container/fpm.conf /etc/php7.1/php-fpm.conf
COPY container/fpm.conf /etc/php7/php-fpm.conf

# set up runit
COPY container/runsvinit /sbin/runsvinit
RUN mkdir /tmp/nginx && mkdir -p /etc/service/nginx && echo '#!/bin/sh' >> /etc/service/nginx/run && \
echo 'nginx' >> /etc/service/nginx/run && chmod +x /etc/service/nginx/run && \
mkdir -p /etc/service/fpm && echo '#!/bin/sh' >> /etc/service/fpm/run && \
echo 'php-fpm7.1 -FR' >> /etc/service/fpm/run && chmod +x /etc/service/fpm/run && \
echo 'php-fpm7 -FR' >> /etc/service/fpm/run && chmod +x /etc/service/fpm/run && \
chmod +x /sbin/runsvinit
ENTRYPOINT ["/sbin/runsvinit"]
CMD ["/sbin/runsvinit"]
EXPOSE 80

# set up app; order of operations optimized for maximum layer reuse
RUN mkdir /var/app
COPY composer.lock /var/app/composer.lock
COPY composer.json /var/app/composer.json
RUN cd /var/app && php7.1 /usr/sbin/composer install --prefer-dist -o
RUN cd /var/app && php /usr/sbin/composer install --prefer-dist -o
COPY templates /var/app/templates
COPY public /var/app/public
COPY bootstrap /var/app/bootstrap
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"aura/sql":"^2.5.1",
"slim/slim": "^3.7.0"
"aura/sql":"^2.6.0",
"slim/slim": "^3.10.0"
}
}
61 changes: 36 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/footer.php
@@ -1,7 +1,7 @@
<div class="container">
<hr>
<footer>
<p>&copy; @iansltx 2015</p>
<p>&copy; @iansltx <?= date('Y') ?></p>
</footer>
</div> <!-- /container -->

Expand Down

0 comments on commit 0a6e320

Please sign in to comment.