Skip to content

Commit 43a6a20

Browse files
authored
Merge pull request #14 from ModestCoders/upgrade-libsodium-1.0.18
add libsodium to php 7.1 image, and upgrade libsodiuim for php 7.2 image
2 parents d66dcaa + ee3bbbe commit 43a6a20

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.4.1] - 2020-01-05
10+
### Added
11+
- Added libsodium to php 7.1 image.
12+
13+
### Changed
14+
- Upgraded libsodium library to version 1.0.18.
15+
916
## [1.4.0] - 2019-09-26
1017
### Added
1118
- Added elasticsearch image

php/7.1-fpm/Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM php:7.1-fpm
22
MAINTAINER Juan Alonso <juan.jalogut@gmail.com>
33

4-
RUN apt-get update && apt-get install -y \
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
55
cron \
66
git \
77
gzip \
@@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
1717
zip \
1818
procps \
1919
sudo \
20+
libsodium-dev \
2021
&& rm -rf /var/lib/apt/lists/*
2122

2223
RUN docker-php-ext-configure \
@@ -35,6 +36,22 @@ RUN docker-php-ext-install \
3536
xsl \
3637
zip
3738

39+
# Remove libsodium and install upgrading version:
40+
RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \
41+
&& rm -f /usr/local/lib/php/extensions/*/*sodium.so \
42+
&& apt-get remove libsodium* -y \
43+
&& mkdir -p /tmp/libsodium \
44+
&& curl -sL https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz | tar xzf - -C /tmp/libsodium \
45+
&& cd /tmp/libsodium/libsodium-1.0.18-RELEASE/ \
46+
&& ./configure \
47+
&& make && make check \
48+
&& make install \
49+
&& cd / \
50+
&& rm -rf /tmp/libsodium \
51+
&& pecl install -o -f libsodium
52+
53+
RUN docker-php-ext-enable sodium
54+
3855
RUN pecl channel-update pecl.php.net \
3956
&& pecl install xdebug \
4057
&& docker-php-ext-enable xdebug \

php/7.2-fpm/Dockerfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM php:7.2-fpm
22
MAINTAINER Juan Alonso <juan.jalogut@gmail.com>
33

4-
RUN apt-get update && apt-get install -y \
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
55
cron \
66
git \
77
gzip \
@@ -34,6 +34,20 @@ RUN docker-php-ext-install \
3434
xsl \
3535
zip
3636

37+
# Remove libsodium and install upgrading version:
38+
RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \
39+
&& rm -f /usr/local/lib/php/extensions/*/*sodium.so \
40+
&& apt-get remove libsodium* -y \
41+
&& mkdir -p /tmp/libsodium \
42+
&& curl -sL https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz | tar xzf - -C /tmp/libsodium \
43+
&& cd /tmp/libsodium/libsodium-1.0.18-RELEASE/ \
44+
&& ./configure \
45+
&& make && make check \
46+
&& make install \
47+
&& cd / \
48+
&& rm -rf /tmp/libsodium \
49+
&& pecl install -o -f libsodium
50+
3751
RUN docker-php-ext-enable sodium
3852

3953
RUN pecl channel-update pecl.php.net \

0 commit comments

Comments
 (0)