frankenphp
frankenphp copied to clipboard
Support for mysql database : Error when i build Dockerfile
Hi everyone, I have an error when building the dockerfile.
=> ERROR [12/15] RUN cd caddy/frankenphp && go build && cp frankenphp /usr/local/bin && cp /go/src/app/caddy/frankenphp/Caddyfile /etc/Caddyfile && rm -Rf /go 49.1s
------
> [12/15] RUN cd caddy/frankenphp && go build && cp frankenphp /usr/local/bin && cp /go/src/app/caddy/frankenphp/Caddyfile /etc/Caddyfile && rm -Rf /go:
#16 0.212 go: downloading github.com/dunglas/mercure/caddy v0.14.1
#16 0.213 go: downloading github.com/caddyserver/caddy/v2 v2.6.1
#16 0.213 go: downloading github.com/dunglas/vulcain/caddy v0.0.0-20220906084821-705c1113298e
#16 0.327 go: downloading github.com/dunglas/mercure v0.14.1
#16 0.348 go: downloading github.com/dunglas/vulcain v0.4.0
#16 0.489 go: downloading go.uber.org/zap v1.23.0
#16 0.520 go: downloading github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
#16 0.611 go: downloading github.com/caddyserver/certmagic v0.17.1
#16 0.645 go: downloading github.com/spf13/cobra v1.5.0
#16 0.673 go: downloading github.com/spf13/pflag v1.0.5
#16 0.724 go: downloading github.com/google/uuid v1.3.0
#16 0.724 go: downloading github.com/lucas-clemente/quic-go v0.29.1
#16 0.747 go: downloading github.com/prometheus/client_golang v1.13.0
#16 0.862 go: downloading golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
#16 0.862 go: downloading golang.org/x/term v0.0.0-20220919170432-7a66f970e087
#16 0.891 go: downloading github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac
#16 0.892 go: downloading github.com/mholt/acmez v1.0.4
#16 0.951 go: downloading github.com/google/cel-go v0.12.5
#16 1.136 go: downloading golang.org/x/net v0.0.0-20221004154528-8021a29435af
#16 1.137 go: downloading google.golang.org/genproto v0.0.0-20220929141241-1ce7b20da813
#16 1.287 go: downloading github.com/klauspost/cpuid/v2 v2.1.1
#16 1.358 go: downloading github.com/libdns/libdns v0.2.1
#16 1.376 go: downloading github.com/miekg/dns v1.1.50
#16 1.430 go: downloading golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
#16 1.430 go: downloading go.uber.org/atomic v1.10.0
#16 1.436 go: downloading go.uber.org/multierr v1.8.0
#16 1.462 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
#16 1.539 go: downloading gopkg.in/yaml.v2 v2.4.0
#16 1.670 go: downloading github.com/beorn7/perks v1.0.1
#16 1.672 go: downloading github.com/cespare/xxhash/v2 v2.1.2
#16 1.692 go: downloading github.com/golang/protobuf v1.5.2
#16 1.694 go: downloading github.com/cespare/xxhash v1.1.0
#16 1.723 go: downloading github.com/prometheus/client_model v0.2.0
#16 1.739 go: downloading github.com/prometheus/common v0.37.0
#16 1.753 go: downloading github.com/prometheus/procfs v0.8.0
#16 1.875 go: downloading google.golang.org/protobuf v1.28.1
#16 1.878 go: downloading github.com/marten-seemann/qpack v0.2.1
#16 1.910 go: downloading github.com/smallstep/certificates v0.22.1
#16 2.325 go: downloading github.com/smallstep/cli v0.22.0
#16 2.879 go: downloading github.com/smallstep/truststore v0.12.0
#16 5.272 go: downloading github.com/tailscale/tscert v0.0.0-20220316030059-54bbcb9f74e2
#16 5.308 go: downloading golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2
#16 5.526 go: downloading github.com/stoewer/go-strcase v1.2.0
#16 5.527 go: downloading github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
#16 5.529 go: downloading github.com/go-chi/chi v4.1.2+incompatible
#16 5.808 go: downloading github.com/smallstep/nosql v0.4.0
#16 5.969 go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
#16 5.980 go: downloading github.com/dgraph-io/ristretto v0.1.0
#16 6.332 go: downloading github.com/gofrs/uuid v4.2.0+incompatible
#16 6.351 go: downloading github.com/golang-jwt/jwt/v4 v4.4.2
#16 6.516 go: downloading github.com/gorilla/handlers v1.5.1
#16 6.549 go: downloading github.com/gorilla/mux v1.8.0
#16 6.581 go: downloading github.com/hashicorp/golang-lru v0.5.4
#16 6.646 go: downloading github.com/kevburnsjr/skipfilter v0.0.1
#16 6.649 go: downloading github.com/spf13/viper v1.12.0
#16 6.650 go: downloading github.com/unrolled/secure v1.12.0
#16 6.663 go: downloading github.com/yosida95/uritemplate/v3 v3.0.2
#16 6.687 go: downloading go.etcd.io/bbolt v1.3.6
#16 6.689 go: downloading github.com/dunglas/httpsfv v0.1.1
#16 6.697 go: downloading github.com/getkin/kin-openapi v0.55.0
#16 6.747 go: downloading github.com/tidwall/gjson v1.7.5
#16 6.747 go: downloading github.com/tidwall/sjson v1.1.6
#16 7.006 go: downloading github.com/russross/blackfriday/v2 v2.1.0
#16 7.008 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2
#16 7.010 go: downloading golang.org/x/exp v0.0.0-20220929160808-de9c53c655b9
#16 7.010 go: downloading github.com/marten-seemann/qtls-go1-19 v0.1.0
#16 7.048 go: downloading github.com/pkg/errors v0.9.1
#16 7.048 go: downloading go.step.sm/cli-utils v0.7.5
#16 7.161 go: downloading go.step.sm/crypto v0.19.0
#16 7.243 go: downloading go.step.sm/linkedca v0.18.0
#16 7.243 go: downloading google.golang.org/grpc v1.49.0
#16 7.244 go: downloading gopkg.in/square/go-jose.v2 v2.6.0
#16 7.273 go: downloading github.com/slackhq/nebula v1.6.1
#16 7.356 go: downloading github.com/klauspost/compress v1.15.11
#16 7.596 go: downloading github.com/BurntSushi/toml v1.2.0
#16 7.598 go: downloading github.com/Masterminds/sprig/v3 v3.2.2
#16 7.648 go: downloading github.com/alecthomas/chroma v0.10.0
#16 7.667 go: downloading github.com/yuin/goldmark v1.5.2
#16 7.948 go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594
#16 7.971 go: downloading gopkg.in/yaml.v3 v3.0.1
#16 8.005 go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.1
#16 8.020 go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0
#16 8.034 go: downloading go.opentelemetry.io/otel v1.10.0
#16 8.047 go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0
#16 8.203 go: downloading go.opentelemetry.io/otel/sdk v1.10.0
#16 8.261 go: downloading github.com/felixge/httpsnoop v1.0.3
#16 8.261 go: downloading github.com/MauriceGit/skiplist v0.0.0-20211105230623-77f5c8d3e145
#16 8.285 go: downloading github.com/RoaringBitmap/roaring v1.2.1
#16 8.381 go: downloading github.com/fsnotify/fsnotify v1.5.4
#16 8.413 go: downloading github.com/mitchellh/mapstructure v1.5.0
#16 8.442 go: downloading github.com/spf13/afero v1.9.2
#16 8.501 go: downloading github.com/spf13/cast v1.5.0
#16 8.525 go: downloading github.com/spf13/jwalterweatherman v1.1.0
#16 8.546 go: downloading github.com/ghodss/yaml v1.0.0
#16 8.568 go: downloading github.com/go-openapi/jsonpointer v0.19.5
#16 8.592 go: downloading github.com/tidwall/match v1.0.3
#16 8.612 go: downloading github.com/tidwall/pretty v1.1.0
#16 8.634 go: downloading github.com/urfave/cli v1.22.10
#16 8.690 go: downloading github.com/mitchellh/go-ps v1.0.0
#16 8.717 go: downloading github.com/micromdm/scep/v2 v2.1.0
#16 8.769 go: downloading go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
#16 8.809 go: downloading github.com/chzyer/readline v1.5.1
#16 8.845 go: downloading github.com/manifoldco/promptui v0.9.0
#16 8.881 go: downloading filippo.io/edwards25519 v1.0.0
#16 8.918 go: downloading github.com/Masterminds/goutils v1.1.1
#16 8.943 go: downloading github.com/Masterminds/semver/v3 v3.1.1
#16 8.973 go: downloading github.com/huandu/xstrings v1.3.2
#16 9.001 go: downloading github.com/imdario/mergo v0.3.13
#16 9.038 go: downloading github.com/mitchellh/copystructure v1.2.0
#16 9.089 go: downloading github.com/shopspring/decimal v1.3.1
#16 9.138 go: downloading go.opentelemetry.io/otel/metric v0.32.1
#16 9.173 go: downloading go.opentelemetry.io/otel/trace v1.10.0
#16 9.300 go: downloading go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0
#16 9.359 go: downloading go.opentelemetry.io/proto/otlp v0.19.0
#16 9.709 go: downloading github.com/rs/xid v1.4.0
#16 10.06 go: downloading github.com/sirupsen/logrus v1.9.0
#16 10.20 go: downloading github.com/dgraph-io/badger v1.6.2
#16 10.48 go: downloading github.com/dgraph-io/badger/v2 v2.2007.4
#16 10.86 go: downloading github.com/go-sql-driver/mysql v1.6.0
#16 10.98 go: downloading github.com/jackc/pgx/v4 v4.17.2
#16 11.16 go: downloading github.com/golang/glog v1.0.0
#16 11.25 go: downloading github.com/subosito/gotenv v1.4.0
#16 11.29 go: downloading github.com/hashicorp/hcl v1.0.0
#16 11.50 go: downloading gopkg.in/ini.v1 v1.67.0
#16 11.62 go: downloading github.com/magiconair/properties v1.8.6
#16 11.69 go: downloading github.com/pelletier/go-toml/v2 v2.0.2
#16 12.53 go: downloading github.com/pelletier/go-toml v1.9.5
#16 12.66 go: downloading github.com/go-openapi/swag v0.19.15
#16 12.73 go: downloading github.com/go-kit/kit v0.12.0
#16 13.11 go: downloading github.com/mitchellh/reflectwalk v1.0.2
#16 13.14 go: downloading github.com/dlclark/regexp2 v1.7.0
#16 13.73 go: downloading github.com/go-logr/logr v1.2.3
#16 13.79 go: downloading github.com/cenkalti/backoff/v4 v4.1.3
#16 13.85 go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
#16 14.74 go: downloading github.com/grpc-ecosystem/grpc-gateway v1.16.0
#16 14.84 go: downloading github.com/go-logr/stdr v1.2.2
#16 15.37 go: downloading github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
#16 15.42 go: downloading github.com/jackc/pgconn v1.13.0
#16 15.43 go: downloading github.com/jackc/pgio v1.0.0
#16 15.52 go: downloading github.com/jackc/pgproto3/v2 v2.3.1
#16 15.53 go: downloading github.com/jackc/pgtype v1.12.0
#16 15.53 go: downloading github.com/mailru/easyjson v0.7.7
#16 15.94 go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
#16 15.94 go: downloading github.com/go-kit/log v0.2.1
#16 15.99 go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
#16 16.01 go: downloading github.com/golang/snappy v0.0.4
#16 16.01 go: downloading github.com/jackc/chunkreader/v2 v2.0.1
#16 16.02 go: downloading github.com/jackc/pgpassfile v1.0.0
#16 16.03 go: downloading github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b
#16 16.10 go: downloading github.com/josharian/intern v1.0.0
#16 16.10 go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
#16 16.11 go: downloading github.com/mattn/go-colorable v0.1.13
#16 16.13 go: downloading github.com/go-logfmt/logfmt v0.5.1
#16 16.18 go: downloading github.com/mattn/go-isatty v0.0.16
#16 47.73 # github.com/dunglas/frankenphp
#16 47.73 In file included from /usr/local/include/php/Zend/zend.h:409,
#16 47.73 from /usr/local/include/php/main/php.h:31,
#16 47.73 from /usr/local/include/php/main/php_variables.h:21,
#16 47.73 from frankenphp.go:14,
#16 47.73 from _cgo_export.c:4:
#16 47.73 /usr/local/include/php/Zend/zend_operators.h: In function 'zend_memrchr':
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:22: warning: implicit declaration of function 'memrchr'; did you mean 'memchr'? [-Wimplicit-function-declaration]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^~~~~~~
#16 47.73 | memchr
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^
#16 47.73 # github.com/dunglas/frankenphp
#16 47.73 In file included from /usr/local/include/php/Zend/zend.h:409,
#16 47.73 from /usr/local/include/php/main/php.h:31,
#16 47.73 from /usr/local/include/php/main/php_variables.h:21,
#16 47.73 from ../../frankenphp.go:14:
#16 47.73 /usr/local/include/php/Zend/zend_operators.h: In function 'zend_memrchr':
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:22: warning: implicit declaration of function 'memrchr'; did you mean 'memchr'? [-Wimplicit-function-declaration]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^~~~~~~
#16 47.73 | memchr
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^
#16 47.73 # github.com/dunglas/frankenphp
#16 47.73 In file included from /usr/local/include/php/Zend/zend.h:409,
#16 47.73 from /usr/local/include/php/main/php.h:31,
#16 47.73 from frankenphp.c:5:
#16 47.73 /usr/local/include/php/Zend/zend_operators.h: In function 'zend_memrchr':
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:22: warning: implicit declaration of function 'memrchr'; did you mean 'memchr'? [-Wimplicit-function-declaration]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^~~~~~~
#16 47.73 | memchr
#16 47.73 /usr/local/include/php/Zend/zend_operators.h:205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#16 47.73 205 | return (const void*)memrchr(s, c, n);
#16 47.73 | ^
#16 47.73 frankenphp.c: At top level:
#16 47.73 frankenphp.c:16:10: fatal error: C-Thread-Pool/thpool.h: No such file or directory
#16 47.73 16 | #include "C-Thread-Pool/thpool.h"
#16 47.73 | ^~~~~~~~~~~~~~~~~~~~~~~~
#16 47.73 compilation terminated.
------
executor failed running [/bin/sh -c cd caddy/frankenphp && go build && cp frankenphp /usr/local/bin && cp /go/src/app/caddy/frankenphp/Caddyfile /etc/Caddyfile && rm -Rf /go]: exit code: 2
In your local dir where you cloned the repo, also clone C-Thread-Pool :
$ git clone [email protected]:dunglas/C-Thread-Pool.git
Then you will be able to build the image.
Also there is a some work about being able to add extensions : #26
More exactly see https://github.com/dunglas/frankenphp/pull/29 and https://github.com/dunglas/frankenphp/pull/33
Fixed by #33