mirror of
https://github.com/librenms/docker.git
synced 2026-08-02 06:43:23 +00:00
Bring back timezone management through symlink (#49)
This commit is contained in:
parent
4797423cae
commit
ee909221a8
3 changed files with 15 additions and 4 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 1.58.1-RC3 (2019/11/29)
|
||||
|
||||
* Bring back timezone management through symlink (#49)
|
||||
|
||||
## 1.58.1-RC2 (2019/11/29)
|
||||
|
||||
* Fix php date timezone (#49)
|
||||
|
|
|
|||
|
|
@ -83,17 +83,17 @@ RUN apk --update --no-cache add \
|
|||
&& pip3 install python-memcached \
|
||||
&& wget -q "https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-amd64.tar.gz" -qO "/tmp/s6-overlay-amd64.tar.gz" \
|
||||
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C / \
|
||||
&& sed -i -e "s/;date\.timezone.*/date\.timezone = UTC/" /etc/php7/php.ini \
|
||||
&& rm -rf /var/cache/apk/* /var/www/* /tmp/* \
|
||||
&& setcap cap_net_raw+ep /usr/bin/nmap \
|
||||
&& setcap cap_net_raw+ep /usr/sbin/fping
|
||||
|
||||
ENV LIBRENMS_VERSION="1.58.1" \
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" \
|
||||
LIBRENMS_VERSION="1.58.1" \
|
||||
LIBRENMS_PATH="/opt/librenms" \
|
||||
LIBRENMS_DOCKER="1" \
|
||||
TZ="UTC" \
|
||||
PUID="1000" \
|
||||
PGID="1000" \
|
||||
S6_BEHAVIOUR_IF_STAGE2_FAILS="2"
|
||||
PGID="1000"
|
||||
|
||||
RUN mkdir -p /opt \
|
||||
&& curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
TZ=${TZ:-UTC}
|
||||
|
||||
MEMORY_LIMIT=${MEMORY_LIMIT:-256M}
|
||||
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-16M}
|
||||
OPCACHE_MEM_SIZE=${OPCACHE_MEM_SIZE:-128}
|
||||
|
|
@ -47,6 +49,11 @@ DB_TIMEOUT=${DB_TIMEOUT:-30}
|
|||
SIDECAR_CRON=${SIDECAR_CRON:-0}
|
||||
SIDECAR_SYSLOGNG=${SIDECAR_SYSLOGNG:-0}
|
||||
|
||||
# Timezone
|
||||
echo "Setting timezone to ${TZ}..."
|
||||
ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
|
||||
echo ${TZ} > /etc/timezone
|
||||
|
||||
# PHP
|
||||
echo "Setting PHP-FPM configuration..."
|
||||
sed -e "s/@MEMORY_LIMIT@/$MEMORY_LIMIT/g" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue