mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #63] Add EXPOSE to Dockerfile #37
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mdharm on GitHub (Mar 8, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/63
Some CI environments look for the list of ports exposed by a container as a way of doing a basic "health check" to verify that the container is running and ready to accept requests. GitLab is one such CI environment. Without an EXPOSE statement in the Dockerfile, the gitlab-runner has no way of checking if the mailpit container is ready to operate as a service or if more time is needed. An error is logged in this case, although it doesn't really affect operation (at least in my tests).
Simply adding the line
EXPOSE 1025 8025toDockerfileresolves the issue. If a different set of ports is used (i.e. via--smtpor `--listen`` command-line options, then this would require changing the Dockerfile. But I see this as unlikely for a CI environment, as ports can be re-mapped between containers.@axllent commented on GitHub (Mar 9, 2023):
@mdharm Thank you, you're absolutely right. I hadn't considered that as I always set the ports manually (to the same ports), but these should be open by default in the Dockerfile. This will be included in the next release.
@axllent commented on GitHub (Mar 10, 2023):
This has been included in the v.1.3.11 release. Thank you for your contribution, and please let me know if you have any issues.