diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index ce15798..f5f3153 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -53,12 +53,12 @@ jobs: if: ${{ inputs.language-versions == true }} run: | NODE_VERSION=$(cat .node-version) - if ! grep -q "^ARG NODE_MAJOR=$NODE_VERSION" Dockerfile; then - echo "Dockerfile has wrong node: $(grep '^ARG NODE_MAJOR' Dockerfile)" >&2 + if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" Dockerfile; then + echo "Dockerfile has wrong node: $(grep '^ARG NODE_VERSION' Dockerfile)" >&2 exit 1 fi - if ! grep -q "^ARG NODE_MAJOR=$NODE_VERSION" Dockerfile.production; then - echo "Dockerfile.production has wrong node: $(grep '^ARG NODE_MAJOR' Dockerfile.production)" >&2 + if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" Dockerfile.production; then + echo "Dockerfile.production has wrong node: $(grep '^ARG NODE_VERSION' Dockerfile.production)" >&2 exit 1 fi diff --git a/Dockerfile b/Dockerfile index d22858a..5b21604 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,8 @@ COPY Gemfile Gemfile.lock ./ RUN bundle ## Node -ARG NODE_MAJOR -RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - +ARG NODE_VERSION +RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - RUN apt-get install -y nodejs ## Yarn diff --git a/Dockerfile.production b/Dockerfile.production index b4cd19e..aebe0dc 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -18,9 +18,9 @@ ENV LANG=en_US.UTF-8 RUN locale-gen # Install NODE_MAJOR -ARG NODE_MAJOR=18 +ARG NODE_VERSION=18 RUN bash -c "export DEBIAN_FRONTEND=noninteractive && \ - curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && \ apt-get update && apt-get install -y nodejs" # Install Yarn via Debian package repository diff --git a/docker-compose.yml b/docker-compose.yml index 8125407..877b357 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: args: RUBY_VERSION: '3.2.2' BUNDLER_VERSION: '2.4.17' - NODE_MAJOR: '18' + NODE_VERSION: '18' entrypoint: ./docker-entrypoint.sh command: bash -c "bundle exec rails s -b 0.0.0.0 -p 3000" stdin_open: true