-
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.
Refactor Dockerfile and linter.py for improved readability and mainta…
…inability
- Loading branch information
1 parent
27958ec
commit 2e8408f
Showing
3 changed files
with
25 additions
and
7 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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
FROM rust:1.82 AS builder | ||
RUN groupadd -r appuser && useradd -r -g appuser appuser | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN cargo build --release | ||
RUN cargo build --release && \ | ||
chown -R appuser:appuser /usr/src/app | ||
USER appuser | ||
|
||
FROM ubuntu:22.04 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libssl3 \ | ||
supervisor && \ | ||
libssl3=3.0.2-0ubuntu1.15 \ | ||
supervisor=4.2.1-2ubuntu4 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
COPY --from=builder /usr/src/app/target/release/hash_hunter /usr/local/bin/hash_hunter | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
WORKDIR /usr/src/app | ||
RUN mkdir -p /usr/src/app/gen | ||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | ||
CMD pgrep supervisord || exit 1 | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |
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