mirror of https://github.com/deuill/go-php.git
Fix static compilation for Docker environment
It's unfortunate that Debian packages do not contain symbolic links for base libraries to their versioned counterparts, and we need to install the `-dev` packages for that. All required packages are now included in the Docker image's runtime dependencies, and the `static` build tag is made to include the correct ones.
This commit is contained in:
parent
683aaf765c
commit
3fd7b8c18d
|
@ -50,7 +50,7 @@ RUN set -xe && \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS}
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS}
|
||||||
|
|
||||||
# Install runtime dependencies for testing, building packages etc, and clean up source.
|
# Install runtime dependencies for testing, building packages etc, and clean up source.
|
||||||
ENV RUNTIME_DEPS="build-essential git curl libedit2 libssl1.0 libxml2"
|
ENV RUNTIME_DEPS="build-essential git curl libssl1.0 libpcre3-dev libcurl4-openssl-dev libedit-dev libxml2-dev zlib1g-dev"
|
||||||
RUN set -xe && \
|
RUN set -xe && \
|
||||||
apt-get update && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} && \
|
apt-get update && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} && \
|
||||||
cd ${PHP_SRC_DIR} && make -j "$(nproc)" PHP_SAPI=embed install-sapi install-headers && \
|
cd ${PHP_SRC_DIR} && make -j "$(nproc)" PHP_SAPI=embed install-sapi install-headers && \
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
|
|
||||||
package php
|
package php
|
||||||
|
|
||||||
// #cgo LDFLAGS: -ldl -lm -lssl -lcrypto -lreadline -lresolv -lpcre -lz -lxml2
|
// #cgo LDFLAGS: -ldl -lm -lcurl -lpcre -lssl -lcrypto -lresolv -ledit -lz -lxml2
|
||||||
import "C"
|
import "C"
|
||||||
|
|
Loading…
Reference in New Issue