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:
Alex Palaistras 2018-06-04 10:42:52 +01:00
parent 683aaf765c
commit 3fd7b8c18d
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ RUN set -xe && \
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.
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 && \
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 && \

View File

@ -6,5 +6,5 @@
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"