Install of libpng16 library for fix react and react with material-ui application (#1625)

* Added commands in Workspace Dockerfile for installation of libpng with configurable env argument switch

* Updated documentation
This commit is contained in:
Emanuele Menon 2018-06-28 07:14:06 +02:00 committed by Shao Yu-Lung (Allen)
parent 1d9cbd7c75
commit dcf6b6d9ac
4 changed files with 40 additions and 0 deletions

View File

@ -1683,3 +1683,30 @@ Example:
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
```
<br>
## I get `Module build failed: Error: write EPIPE` while compiling react application
When you run `npm build` or `yarn dev` building a react application using webpack with elixir you may receive a `Error: write EPIPE` while processing .jpg images.
This is caused of an outdated library for processing **.jpg files** in ubuntu 16.04.
To fix the problem you can follow those steps
1 - Open the `.env`.
2 - Search for `WORKSPACE_INSTALL_LIBPNG` or add the key if missing.
3 - Set the value to true:
```dotenv
WORKSPACE_INSTALL_LIBPNG=true
```
4 - Finally rebuild the workspace image
```bash
docker-compose build workspace
```

View File

@ -86,6 +86,7 @@ services:
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}

View File

@ -112,6 +112,7 @@ WORKSPACE_INSTALL_TERRAFORM=false
WORKSPACE_INSTALL_DUSK_DEPS=false
WORKSPACE_INSTALL_PG_CLIENT=false
WORKSPACE_INSTALL_SWOOLE=false
WORKSPACE_INSTALL_LIBPNG=false
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_CHROME_DRIVER_VERSION=2.32

View File

@ -352,6 +352,17 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
;fi
###########################################################################
# Libpng16 EXTENSION
###########################################################################
ARG INSTALL_LIBPNG=false
RUN if [ ${INSTALL_LIBPNG} = true ]; then \
apt update && \
apt install libpng16-16 \
;fi
###########################################################################
# Drupal Console:
###########################################################################