-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update emailservice Dockerfile to use alpine and multistage build (#703)
* Update emailservice Dockerfile Signed-off-by: svrnm <neumanns@cisco.com> * Use alpine Signed-off-by: svrnm <neumanns@cisco.com> * Add changelog Signed-off-by: svrnm <neumanns@cisco.com> * newline Signed-off-by: svrnm <neumanns@cisco.com> * Update CHANGELOG.md * Update .dockerignore Signed-off-by: svrnm <neumanns@cisco.com> Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
- Loading branch information
1 parent
842a11a
commit c1591d3
Showing
3 changed files
with
16 additions
and
3 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
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 @@ | ||
README.md |
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 |
---|---|---|
@@ -1,13 +1,23 @@ | ||
FROM ruby:3.1.2-slim | ||
FROM ruby:3.1.2-alpine as base | ||
|
||
RUN apt-get update -y && apt-get install -y build-essential | ||
FROM base as builder | ||
|
||
WORKDIR /tmp | ||
|
||
COPY Gemfile Gemfile.lock . | ||
|
||
RUN apk update && apk add make gcc musl-dev && bundle install | ||
|
||
FROM base as release | ||
|
||
WORKDIR /email_server | ||
|
||
COPY . . | ||
|
||
RUN bundle install | ||
RUN chmod 666 ./Gemfile.lock | ||
|
||
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/ | ||
|
||
|
||
EXPOSE ${EMAIL_SERVICE_PORT} | ||
ENTRYPOINT ["bundle", "exec", "ruby", "email_server.rb"] |