Skip to content

Commit deac0c0

Browse files
committed
Fix and improve Dockerfile.
1 parent 7a28bc8 commit deac0c0

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Version 3.0.1 (2025-06-29)][v3.0.1]
9+
10+
### Changed
11+
12+
- Updated dependencies.
13+
14+
### Fixed
15+
16+
- Docker image now works again for real (finally fixes #10?).
17+
818
## [Version 3.0.0 (2025-04-21)][v3.0.0]
919

1020
### Fixed
@@ -93,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
93103
- Fix: Docker image.
94104
- Fix: Options error message.
95105

106+
[v3.0.1]: https://github.com/bovender/imapcli/releases/tag/v3.0.1
96107
[v3.0.0]: https://github.com/bovender/imapcli/releases/tag/v3.0.0
97108
[v2.1.0]: https://github.com/bovender/imapcli/releases/tag/v2.1.0
98109
[v2.0.1]: https://github.com/bovender/imapcli/releases/tag/v2.0.1

Dockerfile

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
FROM ruby:3.4-alpine
2-
LABEL maintainer="bovender@bovender.de"
3-
LABEL description="Command-line tool to query IMAP servers, collect stats etc."
4-
5-
WORKDIR /
6-
ADD . /imapcli
7-
RUN apk add --no-cache git build-base && \
1+
FROM ruby:3.5-rc AS builder
2+
WORKDIR /imapcli
3+
COPY Gemfile Gemfile.lock imapcli.gemspec .
4+
COPY lib/imapcli/version.rb lib/imapcli/version.rb
5+
RUN apt-get update -qq && \
6+
apt-get install -y build-essential libc6 && \
87
gem update --system && \
9-
cd imapcli && \
108
bundle config set --local without development test && \
119
bundle config set --local deployment true && \
12-
bundle install && \
13-
apk del build-base && \
14-
rm -rf /var/cache/apk/*
10+
bundle install
1511

12+
FROM ruby:3.5-rc-slim
13+
LABEL maintainer="bovender@bovender.de"
14+
LABEL description="Command-line tool to query IMAP servers, collect stats etc."
1615
WORKDIR /imapcli
16+
RUN apt-get update -qq && \
17+
apt-get install -y git && \
18+
apt-get clean && rm -rf /var/lib/apt/lists/*
19+
COPY --from=builder /usr/local/bundle /usr/local/bundle
20+
COPY --from=builder /imapcli/vendor /imapcli/vendor
21+
COPY . .
1722
ENTRYPOINT ["bundle", "exec", "exe/imapcli"]
18-

0 commit comments

Comments
 (0)