Open ts03511 opened 4 years ago
alpineベースでdocker-compose作成中...
FROM php:7.3-fpm-alpine
# package install
RUN apk update && apk upgrade
RUN apk add php-bcmath php-ctype php-json php-mbstring php-openssl php-pdo php-tokenizer php-xml php-zip
するってぇと、以下のエラーが発生した
/var/www/app # composer global require laravel/installer
Changed current directory to /root/.composer
Using version ^3.0 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1].
To enable extensions, verify that they are enabled in your .ini files:
-
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
- `ext-zip` とかいうパッケージがないと怒られた
- `apk add` でインストールを試みた
/var/www/app # apk add php-ext-zip ERROR: unsatisfiable constraints: php-ext-zip (missing): required by: world[php-ext-zip]
/var/www/app # apk add ext-zip ERROR: unsatisfiable constraints: ext-zip (missing): required by: world[ext-zip]
/var/www/app #
- そんなものはないらしい
- 困った。
困ったのでGoogle先生に聞いた
alpine php-ext-zip docker
https://qiita.com/Y-Kanoh/items/9d450a6868183557042f
zlib1g-dev
とかいうの入れてからなんかコマンド叩くといいらしい
/var/www/app # apk add zlib1g-dev
ERROR: unsatisfiable constraints:
zlib1g-dev (missing):
required by: world[zlib1g-dev]
/var/www/app #
そんなものはないらしい
とりあえず↑はなかったことにして。 docker-php-ext-install zip
を実行してみる
/var/www/app # docker-php-ext-install zip
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/25) Installing m4 (1.4.18-r1)
(2/25) Installing libbz2 (1.0.8-r1)
(3/25) Installing perl (5.30.1-r0)
(4/25) Installing autoconf (2.69-r2)
(5/25) Installing pkgconf (1.6.3-r0)
(6/25) Installing dpkg-dev (1.19.7-r1)
(7/25) Installing dpkg (1.19.7-r1)
(8/25) Installing libmagic (5.37-r1)
(9/25) Installing file (5.37-r1)
(10/25) Installing libgcc (9.2.0-r3)
(11/25) Installing libstdc++ (9.2.0-r3)
(12/25) Installing binutils (2.33.1-r0)
(13/25) Installing gmp (6.1.2-r1)
(14/25) Installing isl (0.18-r0)
(15/25) Installing libgomp (9.2.0-r3)
(16/25) Installing libatomic (9.2.0-r3)
(17/25) Installing mpfr4 (4.0.2-r1)
(18/25) Installing mpc1 (1.1.0-r1)
(19/25) Installing gcc (9.2.0-r3)
(20/25) Installing musl-dev (1.1.24-r1)
(21/25) Installing libc-dev (0.7.2-r0)
(22/25) Installing g++ (9.2.0-r3)
(23/25) Installing make (4.2.1-r2)
(24/25) Installing re2c (1.3-r0)
(25/25) Installing .phpize-deps (20200312.121931)
Executing busybox-1.31.1-r9.trigger
OK: 228 MiB in 66 packages
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.3 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for zip archive read/writesupport... yes, shared
checking for the location of libz... no
checking pcre install prefix... no
checking libzip... yes
checking for the location of zlib... configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
/var/www/app #
動いた!!....かと思ったらよく見たらエラーになっていた。チッ
zlibがどうのこうの言われている気がする
とりあえずこのQiitaの記事に書いてあることでは無理っぽい。次。
対応ありがとうございます。 今さらですがalpineで作るのは必須ではないです。制約を感じたら変更してもらって大丈夫です。
https://qiita.com/khouki/items/392ab8164aca3cd7e946
libzip-dev
とかいうのを入れてからコマンド叩くとよいらしい/var/www/app # apk add libzip-dev
(1/2) Installing zlib-dev (1.2.11-r3)
(2/2) Installing libzip-dev (1.5.2-r0)
OK: 228 MiB in 68 packages
docker-php-ext-install zip
を実行してみた/var/www/app # docker-php-ext-install zip
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.3 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for zip archive read/writesupport... yes, shared
checking for the location of libz... no
checking pcre install prefix... no
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... /usr/bin/pkg-config
checking for libzip... from pkgconfig: version 1.5.2 found in /usr/lib
checking for zip_open in -lzip... yes
checking for zip_file_set_encryption in -lzip... yes
checking for zip_libzip_version in -lzip... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking fts.h usability... no
checking fts.h presence... no
checking for fts.h... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for ssize_t... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of off_t... 8
checking size of size_t... 8
checking for touch... /bin/touch
checking for unzip... /usr/bin/unzip
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/src/php/ext/zip/libtool --mode=compile cc -I. -I/usr/src/php/ext/zip -DPHP_ATOM_INC -I/usr/src/php/ext/zip/include -I/usr/src/php/ext/zip/main -I/usr/src/php/ext/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/zip/php_zip.c -o php_zip.lo
mkdir .libs
cc -I. -I/usr/src/php/ext/zip -DPHP_ATOM_INC -I/usr/src/php/ext/zip/include -I/usr/src/php/ext/zip/main -I/usr/src/php/ext/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/zip/php_zip.c -fPIC -DPIC -o .libs/php_zip.o
/bin/sh /usr/src/php/ext/zip/libtool --mode=compile cc -I. -I/usr/src/php/ext/zip -DPHP_ATOM_INC -I/usr/src/php/ext/zip/include -I/usr/src/php/ext/zip/main -I/usr/src/php/ext/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/zip/zip_stream.c -o zip_stream.lo
cc -I. -I/usr/src/php/ext/zip -DPHP_ATOM_INC -I/usr/src/php/ext/zip/include -I/usr/src/php/ext/zip/main -I/usr/src/php/ext/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/zip/zip_stream.c -fPIC -DPIC -o .libs/zip_stream.o
/bin/sh /usr/src/php/ext/zip/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/zip/include -I/usr/src/php/ext/zip/main -I/usr/src/php/ext/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o zip.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/zip/modules php_zip.lo zip_stream.lo -lzip -lzip -lz
cc -shared .libs/php_zip.o .libs/zip_stream.o -lzip -lz -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,zip.so -o .libs/zip.so
creating zip.la
(cd .libs && rm -f zip.la && ln -s ../zip.la zip.la)
/bin/sh /usr/src/php/ext/zip/libtool --mode=install cp ./zip.la /usr/src/php/ext/zip/modules
cp ./.libs/zip.so /usr/src/php/ext/zip/modules/zip.so
cp ./.libs/zip.lai /usr/src/php/ext/zip/modules/zip.la
PATH="$PATH:/sbin" ldconfig -n /usr/src/php/ext/zip/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/src/php/ext/zip/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la modules/* libs/*
/var/www/app #
/var/www/app # composer global require laravel/installer
Changed current directory to /root/.composer
Using version ^3.0 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 14 installs, 0 updates, 0 removals
- Installing symfony/process (v5.0.5): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.14.0): Downloading (100%)
- Installing symfony/filesystem (v5.0.5): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Installing symfony/service-contracts (v2.0.1): Downloading (100%)
- Installing symfony/polyfill-php73 (v1.14.0): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.14.0): Downloading (100%)
- Installing symfony/console (v5.0.5): Downloading (100%)
- Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing guzzlehttp/guzzle (6.5.2): Downloading (100%)
- Installing laravel/installer (v3.0.1): Downloading (100%)
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing psr/log (For using the console logger)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
guzzlehttp/guzzle suggests installing ext-intl (Required for Internationalized Domain Name (IDN) support)
Writing lock file
Generating autoload files
1 package you are using is looking for funding.
Use the composer fund command to find out more!
/var/www/app # composer create-project --prefer-dist "laravel/laravel=6.*" test
Creating a "laravel/laravel=6.*" project at "./test"
Installing laravel/laravel (v6.18.0)
- Installing laravel/laravel (v6.18.0): Downloading (100%)
Created project in /var/www/app/test
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 85 installs, 0 updates, 0 removals
- Installing symfony/polyfill-ctype (v1.14.0): Loading from cache
- Installing phpoption/phpoption (1.7.2): Downloading (100%)
- Installing vlucas/phpdotenv (v3.6.0): Downloading (100%)
- Installing symfony/css-selector (v5.0.5): Downloading (100%)
- Installing tijsverkoyen/css-to-inline-styles (2.2.2): Downloading (100%)
- Installing symfony/polyfill-php72 (v1.14.0): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.14.0): Loading from cache
- Installing symfony/var-dumper (v4.4.5): Downloading (100%)
- Installing symfony/routing (v4.4.5): Downloading (100%)
- Installing symfony/process (v4.4.5): Downloading (100%)
- Installing psr/log (1.1.2): Downloading (100%)
- Installing symfony/polyfill-php73 (v1.14.0): Loading from cache
- Installing symfony/polyfill-intl-idn (v1.14.0): Downloading (100%)
- Installing symfony/mime (v5.0.5): Downloading (100%)
- Installing symfony/http-foundation (v4.4.5): Downloading (100%)
- Installing symfony/event-dispatcher-contracts (v1.1.7): Downloading (100%)
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/event-dispatcher (v4.4.5): Downloading (100%)
- Installing symfony/debug (v4.4.5): Downloading (100%)
- Installing symfony/error-handler (v4.4.5): Downloading (100%)
- Installing symfony/http-kernel (v4.4.5): Downloading (100%)
- Installing symfony/finder (v4.4.5): Downloading (100%)
- Installing symfony/service-contracts (v2.0.1): Loading from cache
- Installing symfony/console (v4.4.5): Downloading (100%)
- Installing symfony/polyfill-iconv (v1.14.0): Downloading (100%)
- Installing doctrine/lexer (1.2.0): Downloading (100%)
- Installing egulias/email-validator (2.1.17): Downloading (100%)
- Installing swiftmailer/swiftmailer (v6.2.3): Downloading (100%)
- Installing paragonie/random_compat (v9.99.99): Downloading (100%)
- Installing ramsey/uuid (3.9.3): Downloading (100%)
- Installing psr/simple-cache (1.0.1): Downloading (100%)
- Installing opis/closure (3.5.1): Downloading (100%)
- Installing symfony/translation-contracts (v2.0.1): Downloading (100%)
- Installing symfony/translation (v4.4.5): Downloading (100%)
- Installing nesbot/carbon (2.31.0): Downloading (100%)
- Installing monolog/monolog (2.0.2): Downloading (100%)
- Installing league/flysystem (1.0.65): Downloading (100%)
- Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%)
- Installing doctrine/inflector (1.3.1): Downloading (100%)
- Installing league/commonmark (1.3.1): Downloading (100%)
- Installing laravel/framework (v6.18.1): Downloading (100%)
- Installing fideloper/proxy (4.3.0): Downloading (100%)
- Installing jakub-onderka/php-console-color (v0.2): Downloading (100%)
- Installing jakub-onderka/php-console-highlighter (v0.4): Downloading (100%)
- Installing nikic/php-parser (v4.3.0): Downloading (100%)
- Installing dnoegel/php-xdg-base-dir (v0.1.1): Downloading (100%)
- Installing psy/psysh (v0.9.12): Downloading (100%)
- Installing laravel/tinker (v2.2.0): Downloading (100%)
- Installing scrivo/highlight.php (v9.18.1.1): Downloading (100%)
- Installing filp/whoops (2.7.1): Downloading (100%)
- Installing facade/ignition-contracts (1.0.0): Downloading (100%)
- Installing facade/flare-client-php (1.3.2): Downloading (100%)
- Installing facade/ignition (1.16.1): Downloading (100%)
- Installing fzaninotto/faker (v1.9.1): Downloading (100%)
- Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%)
- Installing mockery/mockery (1.3.1): Downloading (100%)
- Installing nunomaduro/collision (v3.0.1): Downloading (100%)
- Installing sebastian/version (2.0.1): Downloading (100%)
- Installing sebastian/type (1.1.3): Downloading (100%)
- Installing sebastian/resource-operations (2.0.1): Downloading (100%)
- Installing sebastian/recursion-context (3.0.0): Downloading (100%)
- Installing sebastian/object-reflector (1.1.1): Downloading (100%)
- Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
- Installing sebastian/global-state (3.0.0): Downloading (100%)
- Installing sebastian/exporter (3.1.2): Downloading (100%)
- Installing sebastian/environment (4.2.3): Downloading (100%)
- Installing sebastian/diff (3.0.2): Downloading (100%)
- Installing sebastian/comparator (3.0.2): Downloading (100%)
- Installing phpunit/php-timer (2.1.2): Downloading (100%)
- Installing phpunit/php-text-template (1.2.1): Downloading (100%)
- Installing phpunit/php-file-iterator (2.0.2): Downloading (100%)
- Installing theseer/tokenizer (1.1.3): Downloading (100%)
- Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
- Installing phpunit/php-token-stream (3.1.1): Downloading (100%)
- Installing phpunit/php-code-coverage (7.0.10): Downloading (100%)
- Installing doctrine/instantiator (1.3.0): Downloading (100%)
- Installing phpdocumentor/reflection-common (2.0.0): Downloading (100%)
- Installing phpdocumentor/type-resolver (1.1.0): Downloading (100%)
- Installing webmozart/assert (1.7.0): Downloading (100%)
- Installing phpdocumentor/reflection-docblock (5.1.0): Downloading (100%)
- Installing phpspec/prophecy (v1.10.3): Downloading (100%)
- Installing phar-io/version (2.0.1): Downloading (100%)
- Installing phar-io/manifest (1.0.3): Downloading (100%)
- Installing myclabs/deep-copy (1.9.5): Downloading (100%)
- Installing phpunit/phpunit (8.5.2): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/http-kernel suggests installing symfony/browser-kit
symfony/http-kernel suggests installing symfony/config
symfony/http-kernel suggests installing symfony/dependency-injection
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/lock
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
laravel/framework suggests installing ext-gd (Required to use Illuminate\Http\Testing\FileFactory::image().)
laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers.)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).)
laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
laravel/framework suggests installing nyholm/psr7 (Required to use PSR-7 bridging features (^1.2).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
laravel/framework suggests installing psr/http-message (Required to allow Storage::put to accept a StreamInterface (^1.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^4.3.4).)
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^1.2).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
facade/ignition suggests installing laravel/telescope (^2.0)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
14 packages you are using are looking for funding.
Use the composer fund command to find out more!
> @php artisan key:generate --ansi
Application key set successfully.
/var/www/app #
@nacco-bron 2時間足らずでここまで来れたので多分大丈夫そうです。
config書いた。Laravelが動くようになったぽい。 これをコンテナに食わせてNacconahaを動かしてみた。 500エラーが出た。
env作ってなかったのを思い出してenv作った。
APP_KEYがなかったので php artisan key:generte
した
これでもまだエラーが出る。
migrateしていないことに気づいた
php artisan migrate
したら怒られた。なんでやねん。
エラーMSGは could not find driver
まじか。
php artisan tinker
からDBにつないでみた
/var/www/app # php artisan tinker
Psy Shell v0.9.12 (PHP 7.3.15 ― cli) by Justin Hileman
>>>
>>>
>>> $tables = \DB::select('show tables');
Doctrine/DBAL/Driver/PDOException with message 'could not find driver'
>>>
まじか。そうか。 Google先生に聞こう。
以下のワードで検索した
docker alpine laravel Doctrine/DBAL/Driver/PDOException with message 'could not find driver'
Qiita引っかかった https://qiita.com/tarch710/items/1236a23f7ffde4c512f2
RUN docker-php-ext-install pdo_mysql
を追加するとよいらしい
/var/www/app # docker-php-ext-install pdo_mysql
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/24) Installing m4 (1.4.18-r1)
(2/24) Installing libbz2 (1.0.8-r1)
(3/24) Installing perl (5.30.1-r0)
(省略)
checking whether to build static libraries... no
(省略)
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
cp ./.libs/pdo_mysql.lai /usr/src/php/ext/pdo_mysql/modules/pdo_mysql.la
PATH="$PATH:/sbin" ldconfig -n /usr/src/php/ext/pdo_mysql/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/src/php/ext/pdo_mysql/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
(省略)
Executing busybox-1.31.1-r9.trigger
OK: 15 MiB in 44 packages
なんかインストールできたっぽい もっかいmigrationしよう
/var/www/app # php artisan migrate
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.02 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.01 seconds)
Migrating: 2019_12_16_104335_create_flowers_table
Migrated: 2019_12_16_104335_create_flowers_table (0.01 seconds)
Migrating: 2019_12_18_134024_create_families_table
Migrated: 2019_12_18_134024_create_families_table (0.01 seconds)
Migrating: 2019_12_18_143108_add_family_id_to_flowers_table
Migrated: 2019_12_18_143108_add_family_id_to_flowers_table (0.01 seconds)
Migrating: 2020_01_25_000041_alter_table_families_unset_auto_increment
Migrated: 2020_01_25_000041_alter_table_families_unset_auto_increment (0.02 seconds)
Migrating: 2020_01_25_003535_alter_table_flowers_drop_column_file_name
Migrated: 2020_01_25_003535_alter_table_flowers_drop_column_file_name (0 seconds)
Migrating: 2020_02_02_034726_create_discoveries_table
Migrated: 2020_02_02_034726_create_discoveries_table (0.01 seconds)
Migrating: 2020_02_02_044654_alter_table_families_add_comment
Migrated: 2020_02_02_044654_alter_table_families_add_comment (0.01 seconds)
Migrating: 2020_02_02_045314_alter_table_flowers_add_comment
Migrated: 2020_02_02_045314_alter_table_flowers_add_comment (0.01 seconds)
Migrating: 2020_02_02_070003_add_address1_address2_address3_to_discoveries_table
Migrated: 2020_02_02_070003_add_address1_address2_address3_to_discoveries_table (0.04 seconds)
Migrating: 2020_02_11_034147_create_prefectures_table
Migrated: 2020_02_11_034147_create_prefectures_table (0.01 seconds)
Migrating: 2020_02_11_042922_create_cities_table
Migrated: 2020_02_11_042922_create_cities_table (0.01 seconds)
Migrating: 2020_02_11_043014_alter_table_prefectures_add_comment
Migrated: 2020_02_11_043014_alter_table_prefectures_add_comment (0.01 seconds)
Migrating: 2020_02_15_031732_add_city_id_to_discoveries_table
Migrated: 2020_02_15_031732_add_city_id_to_discoveries_table (0.02 seconds)
Migrating: 2020_02_15_042154_rename_pref_id_to_prefecture_id_on_discoveries_table
Migrated: 2020_02_15_042154_rename_pref_id_to_prefecture_id_on_discoveries_table (0.02 seconds)
/var/www/app #
動いた。うおうお。
(゚∀゚)キタコレ!!
概要
ToDo
その他
完了の定義