Skip to content

Commit bc67961

Browse files
authored
Merge pull request rails#52179 from Uaitt/Dockerfile-FromAsCasing-offenses
Fix `FromAsCasing` offense while building a Dockerfile
2 parents eea3d5a + 9b43e91 commit bc67961

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

railties/lib/rails/generators/rails/app/templates/Dockerfile.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
1010
ARG RUBY_VERSION=<%= gem_ruby_version %>
11-
FROM docker.io/library/ruby:$RUBY_VERSION-slim as base
11+
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
1212

1313
# Rails app lives here
1414
WORKDIR /rails
@@ -25,7 +25,7 @@ ENV RAILS_ENV="production" \
2525
BUNDLE_WITHOUT="development"
2626

2727
# Throw-away build stage to reduce size of final image
28-
FROM base as build
28+
FROM base AS build
2929

3030
# Install packages needed to build gems<%= using_node? ? " and node modules" : "" %>
3131
RUN apt-get update -qq && \

railties/test/fixtures/Dockerfile.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
44
ARG RUBY_VERSION=3.2.2
5-
FROM docker.io/library/ruby:$RUBY_VERSION-slim as base
5+
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
66

77
# Rails app lives here
88
WORKDIR /rails
@@ -18,7 +18,7 @@ ENV RAILS_ENV="production" \
1818
BUNDLE_WITHOUT="development"
1919

2020
# Throw-away build stage to reduce size of final image
21-
FROM base as build
21+
FROM base AS build
2222

2323
# Install packages needed to build gems
2424
RUN apt-get install --no-install-recommends -y build-essential git pkg-config

0 commit comments

Comments
 (0)