This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git | ||
vendor/ | ||
spec/ | ||
.github/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ruby:3.2.0-slim as base | ||
|
||
WORKDIR /mnt | ||
|
||
RUN adduser --system app &&\ | ||
bundle config --local path vendor/bundle &&\ | ||
bundle config set --local deployment 'true' &&\ | ||
bundle config set --local without 'development test' | ||
|
||
RUN apt-get update &&\ | ||
apt-get install -qy --no-install-recommends git | ||
|
||
|
||
FROM base as builder | ||
|
||
RUN apt-get update &&\ | ||
apt-get install -qy --no-install-recommends build-essential | ||
|
||
COPY Gemfile Gemfile.lock ./ | ||
RUN bundle install | ||
|
||
FROM base | ||
|
||
COPY --from=builder /mnt/vendor . | ||
|
||
ADD . . | ||
|
||
USER app | ||
|
||
CMD ["bundle", "exec", "./exe/nats_streamer", "/config.yaml", "$PATH"] |