You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lcobucci has stopped working in docker PHP alpine 8+
Your environment:
Q
A
Bug?
yes
New Feature?
no
Framework
Laravel / Lumen
Framework version
latest
Package version
latest
PHP version
latest
Steps to reproduce
Dockerfile:
FROM php:8-fpm-alpine3.13
ENV \
COMPOSER_ALLOW_SUPERUSER=1 \
PHP_EXTENSIONS="bcmath bz2 calendar exif gd gettext gmp imap intl ldap mysqli pcntl pdo_mysql pgsql pdo_pgsql \
soap sockets swoole swoole_async sysvshm sysvmsg sysvsem tidy zip zephir_parser"
# set up the UK timezone as well.
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN \
# deps
# adduser
addgroup -S app \
&& adduser -S -D -h /var/www app app \
&& apk add -U --no-cache --virtual temp \
# dev deps
autoconf g++ nginx file supervisor git re2c make zlib-dev libtool pcre-dev libxml2-dev bzip2-dev libzip-dev \
icu-dev gettext-dev imagemagick-dev openldap-dev libpng-dev gmp-dev yaml-dev postgresql-dev \
libxml2-dev tidyhtml-dev libmemcached-dev libssh2-dev libevent-dev libev-dev lua-dev \
autoconf automake make gcc g++ \
# prod deps
&& apk add --no-cache icu gettext imagemagick libzip libbz2 libxml2-utils openldap-back-mdb openldap yaml \
libpq tidyhtml imap-dev libmemcached libssh2 libevent libev lua zip \
# php extensions
&& docker-php-source extract \
&& pecl channel-update pecl.php.net \
&& pecl install $PECL_EXTENSIONS \
&& cd /usr/src/php/ext/ \
&& for BUNDLE_EXT in $PECL_BUNDLE; do pecl bundle $BUNDLE_EXT; done \
&& docker-php-ext-enable $(echo $PECL_EXTENSIONS | sed -E 's/\-[^ ]+//g') opcache
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \
docker-php-ext-configure gd && \
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
docker-php-ext-install -j${NPROC} gd && \
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev
RUN docker-php-ext-install pdo pdo_pgsql
RUN docker-php-ext-install zip
# REDIS EXTENSION
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
# INSTALL XDEBUG
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
# install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# COPY Code and Config File
COPY . /var/www
WORKDIR /var/www
#USER app
EXPOSE 80
RUN composer install --ignore-platform-reqs --optimize-autoloader --no-dev \
&& chown -R app:app /var/www
RUN chown -R www-data:www-data /var/www
RUN chown -R $USER:www-data /var/www/storage
RUN mkdir -p /var/www/storage/framework/cache/laravel-excel
RUN chown -R $USER:www-data /var/www/storage/framework/cache/laravel-excel
RUN chown -R $USER:www-data /var/www/bootstrap/cache
RUN chown -R $USER:www-data /var/www
RUN chmod -R 777 ./storage
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
Just run docker build -t . locally and see.
Expected behavior
Package has been installed
Actual behavior
The problem is mistyping from interfaces, I know the package is not ready yet to support 8+ since this is still on the discussion on #76, but I believe it's. time to think forward. We cannot ask to users downgrade PHP versions just because someone didn't upgrade their versions, move forward always not backward.
I can confirm that this is the behaviour, when JWT_SECRET is not set in the .env-file.
One simple solution would be to add an empty string as default value to the config-file.
<?phpreturn [
/* |-------------------------------------------------------------------------- | JWT Authentication Secret |-------------------------------------------------------------------------- | | Don't forget to set this in your .env file, as it will be used to sign | your tokens. A helper command is provided for this: | `php artisan jwt:secret` | | Note: This will be used for Symmetric algorithms only (HMAC), | since RSA and ECDSA use a private/public key combo (See below). | */'secret' => env('JWT_SECRET', ''),
...
But it needs to be checked if it has some side effects.
Subject of the issue
Lcobucci has stopped working in docker PHP alpine 8+
Your environment:
Steps to reproduce
Dockerfile:
Just run
docker build -t .
locally and see.Expected behavior
Package has been installed
Actual behavior
The problem is mistyping from interfaces, I know the package is not ready yet to support 8+ since this is still on the discussion on #76, but I believe it's. time to think forward. We cannot ask to users downgrade PHP versions just because someone didn't upgrade their versions, move forward always not backward.
additional log docker information.
The text was updated successfully, but these errors were encountered: