-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deployment): added new Dockerfile for dummy_recorder service
- Loading branch information
1 parent
b43ae77
commit 6b95224
Showing
1 changed file
with
26 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,26 @@ | ||
#syntax = devthefuture/dockerfile-x | ||
|
||
INCLUDE deployments/images/base/Dockerfile | ||
|
||
FROM base AS builder | ||
WORKDIR /app | ||
COPY . . | ||
RUN cargo build --bin dummy_recorder | ||
|
||
FROM ubuntu:22.04 | ||
|
||
ENV ID=1000 | ||
WORKDIR /app | ||
COPY --from=builder /app/target/debug/dummy_recorder ./target/debug/dummy_recorder | ||
COPY --from=builder /usr/bin/tini /usr/bin/tini | ||
|
||
RUN set -ex; \ | ||
addgroup --gid ${ID} dummy_recorder; \ | ||
adduser --ingroup $(getent group ${ID} | cut -d: -f1) --uid ${ID} --gecos "" --disabled-password --home /app dummy_recorder; \ | ||
chown -R dummy_recorder:dummy_recorder /app | ||
|
||
EXPOSE 8080 | ||
|
||
USER ${ID} | ||
|
||
ENTRYPOINT ["tini", "--", "/app/target/debug/dummy_recorder"] |