Skip to content

Commit

Permalink
improve readability of Dockerfile
Browse files Browse the repository at this point in the history
Switch to docker/dockerfile:1 syntax. This requires buildx.
  • Loading branch information
dmke committed Feb 1, 2024
1 parent 46bceb3 commit 3bbe31a
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# syntax=docker/dockerfile:1
FROM ruby:3.2-alpine

WORKDIR /app
COPY Gemfile Gemfile.lock /app/
RUN set -ex \
&& apk add --no-cache --virtual build-dependencies \
make \
gcc \
libc-dev \
git \
&& bundle config set --local deployment "true" \
&& bundle config set --local without "development test" \
&& bundle install \
&& apk del build-dependencies

# hadolint ignore=DL3018
RUN <<BASH
set -ex

apk add --no-cache --virtual build-dependencies \
make \
gcc \
libc-dev \
git

bundle config set --local deployment "true"
bundle config set --local without "development test"
bundle install

apk del build-dependencies
BASH

COPY . .

Expand Down

0 comments on commit 3bbe31a

Please sign in to comment.