docker-symfony icon indicating copy to clipboard operation
docker-symfony copied to clipboard

Add Optional Nodejs

Open StephenOTT opened this issue 7 years ago • 4 comments

Used more and more in applications for various use cases. Would be great o have optional node similar to optional redis.

StephenOTT avatar Dec 05 '16 16:12 StephenOTT

+1

marnixbent avatar Jul 23 '17 13:07 marnixbent

Would be great o have optional node similar to optional redis.

As it stand, you can easily add a NodeJS container. After there is too many use case to add it in this stack. Why do you want a NodeJS container in this stack?

maxpou avatar Aug 01 '17 15:08 maxpou

I attached NodeJs and NPM by simply editing php7-fpm/Dockerfile I just added two lines:

RUN curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh

and then extend

RUN apt-get update && apt-get install -y \
    openssl \
    git \
    unzip

to

RUN apt-get update && apt-get install -y \
    openssl \
    git \
    unzip \
    nodejs \
    build-essential

If there is a better solution please let me know.

tomasyhy avatar Oct 19 '17 08:10 tomasyhy

I get error

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
(23) Failed writing body
Error executing command, exiting
ERROR: Service 'php' failed to build: The command '/bin/sh -c bash nodesource_setup.sh' returned a non-zero code: 1

grekpg avatar Jan 05 '19 14:01 grekpg