Skip to content

Commit

Permalink
fix: install error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgrv committed Sep 15, 2024
1 parent b62af4d commit 30a41c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/pecl/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "PECL Install feature",
"id": "pecl",
"version": "1.0.4",
"version": "1.0.5",
"description": "Add pecl",
"options": {
"extension": {
Expand Down
15 changes: 8 additions & 7 deletions src/pecl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ echo "Activating pecl extension '${EXTENSION}'"
phpVersion=$(php -v | head -n 1 | awk '{print $2}')

# Install pecl extension
apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends lib${EXTENSION}-dev \
&& pecl install ${EXTENSION} \
&& mkdir -p /usr/local/php/$phpVersion/ini/conf.d \
&& echo "extension=${EXTENSION}" >> /usr/local/php/$phpVersion/ini/conf.d/${EXTENSION}.ini \
&& rm -rf /tmp/pear \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
apt-get update && export DEBIAN_FRONTEND=noninteractive &&
apt-get -y install --no-install-recommends lib${EXTENSION}-dev

pecl install ${EXTENSION} &&
mkdir -p /usr/local/php/$phpVersion/ini/conf.d &&
echo "extension=${EXTENSION}" >>/usr/local/php/$phpVersion/ini/conf.d/${EXTENSION}.ini &&
rm -rf /tmp/pear &&
apt-get clean -y && rm -rf /var/lib/apt/lists/*

0 comments on commit 30a41c7

Please sign in to comment.