541-add-linuxbrew-option (#543)

* 541-add-linuxbrew-option

* 541 updated readme with installation information
This commit is contained in:
Mike Erickson 2017-01-13 11:12:44 -08:00 committed by Philippe Trépanier
parent fbc71b5a22
commit a80ef301a9
3 changed files with 77 additions and 14 deletions

View File

@ -87,6 +87,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to
- [Install Prestissimo](#Install-Prestissimo)
- [Install Node + NVM](#Install-Node)
- [Install Node + YARN](#Install-Yarn)
- [Install Linuxbrew](#Install-Brew)
- [Debugging](#debugging)
- [Upgrading LaraDock](#upgrading-laradock)
- [Related Projects](#related-projects)
@ -1524,6 +1525,34 @@ It should be like this:
<br>
<a name="Install-Linuxbrew"></a>
### Install Linuxbrew
Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found [here](http://linuxbrew.sh). To install Linuxbrew in the Workspace container:
1 - Open the `docker-compose.yml` file
2 - Search for the `INSTALL_LINUXBREW` argument under the Workspace Container and set it to `true`
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_LINUXBREW=true
...
```
3 - Re-build the container `docker-compose build workspace`
<br>
<a name="Install-Aerospike-Extension"></a>
### Install Aerospike extension

View File

@ -26,6 +26,7 @@ services:
- COMPOSER_GLOBAL_INSTALL=false
- INSTALL_WORKSPACE_SSH=false
- INSTALL_LARAVEL_ENVOY=false
- INSTALL_LINUXBREW=false
- PUID=1000
- PGID=1000
- NODE_VERSION=stable

View File

@ -291,6 +291,39 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
&& composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Linuxbrew:
#####################################
USER root
ARG INSTALL_LINUXBREW=true
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation
apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \
gettext libtool flex bison \
libbz2-dev libcurl4-openssl-dev \
libexpat-dev libncurses-dev && \
# Install the Linuxbrew
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
echo "" >> ~/.bashrc && \
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
# Setup linuxbrew
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
;fi
#
#--------------------------------------------------------------------------
# Final Touch