Skip to content

Commit 4d83888

Browse files
committed
added support for node versions
1 parent 48806a6 commit 4d83888

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#######################
22
###> stack versions ###
33

4-
# php version ie: 7.4, currently others not avialable
4+
# php version ie: 7.1, 7.2, 7.3 and 7.4
55
PHP_VERSION=7.4
66

7-
# mariadb version ie: 10, 10.5.5 or any valid version
7+
# mariadb version ie: 10.1, 10.2, 10.3, 10.4, 10.5 or 10 or any valid version
88
MARIADB_VERSION=10
99

10+
# node version ie: 10.x, 11.x, 12.x, 13.x, 14.x or any valid version
11+
NODE_VERSION=14.x
12+
1013
###< stack versions ###
1114
#######################
1215

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ services:
1010
- ./project:/var/www/project
1111

1212
cli:
13-
build: php${PHP_VERSION}/cli
13+
build:
14+
context: php${PHP_VERSION}/cli
15+
args:
16+
NODE_VERSION: ${NODE_VERSION}
1417
working_dir: /var/www/project
1518
volumes:
1619
- ./project:/var/www/project

php7.1/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM php:7.1-cli
22

33
MAINTAINER ReadyMadeHost
44

5+
ARG NODE_VERSION
6+
ENV NODE_VERSION ${NODE_VERSION}
7+
58
# Installing required packages
69
RUN apt-get update && apt-get upgrade -y
710
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -49,7 +52,7 @@ RUN wget https://get.symfony.com/cli/installer -O - | bash
4952
RUN echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc
5053

5154
# Installing node
52-
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
55+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
5356
RUN apt-get -y install nodejs
5457

5558
# Manage project and add scripts

php7.2/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM php:7.2-cli
22

33
MAINTAINER ReadyMadeHost
44

5+
ARG NODE_VERSION
6+
ENV NODE_VERSION ${NODE_VERSION}
7+
58
# Installing required packages
69
RUN apt-get update && apt-get upgrade -y
710
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -49,7 +52,7 @@ RUN wget https://get.symfony.com/cli/installer -O - | bash
4952
RUN echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc
5053

5154
# Installing node
52-
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
55+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
5356
RUN apt-get -y install nodejs
5457

5558
# Manage project and add scripts

php7.3/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM php:7.3-cli
22

33
MAINTAINER ReadyMadeHost
44

5+
ARG NODE_VERSION
6+
ENV NODE_VERSION ${NODE_VERSION}
7+
58
# Installing required packages
69
RUN apt-get update && apt-get upgrade -y
710
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -49,7 +52,7 @@ RUN wget https://get.symfony.com/cli/installer -O - | bash
4952
RUN echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc
5053

5154
# Installing node
52-
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
55+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
5356
RUN apt-get -y install nodejs
5457

5558
# Manage project and add scripts

php7.4/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM php:7.4-cli
22

33
MAINTAINER ReadyMadeHost
44

5+
ARG NODE_VERSION
6+
ENV NODE_VERSION ${NODE_VERSION}
7+
58
# Installing required packages
69
RUN apt-get update && apt-get upgrade -y
710
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -51,7 +54,7 @@ RUN wget https://get.symfony.com/cli/installer -O - | bash
5154
RUN echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc
5255

5356
# Installing node
54-
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
57+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
5558
RUN apt-get -y install nodejs
5659

5760
# Manage project and add scripts

0 commit comments

Comments
 (0)