-
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.
- Loading branch information
Showing
1 changed file
with
15 additions
and
12 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM docker.io/paritytech/ci-unified:latest as builder | ||
FROM docker.io/paritytech/ci-unified:latest AS builder | ||
|
||
WORKDIR /acala | ||
COPY . . | ||
|
@@ -8,24 +8,27 @@ RUN cargo build --locked --release | |
|
||
# ============= | ||
|
||
FROM docker.io/parity/base-bin:latest | ||
FROM phusion/baseimage:noble-1.0.0 | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN useradd -m -u 1000 -U -s /bin/sh -d /acala acala | ||
|
||
COPY --from=builder /acala/target/release/acala /usr/local/bin | ||
|
||
USER root | ||
RUN useradd -m -u 1000 -U -s /bin/sh -d /acala acala && \ | ||
mkdir -p /acala/data /acala/.local/share && \ | ||
chown -R acala:acala /acala/data && \ | ||
ln -s /acala/data /acala/.local/share/acala && \ | ||
# unclutter and minimize the attack surface | ||
rm -rf /usr/bin /usr/sbin && \ | ||
# check if executable works in this container | ||
# checks | ||
RUN ldd /usr/local/bin/acala && \ | ||
/usr/local/bin/acala --version | ||
|
||
# Shrinking | ||
RUN rm -rf /usr/lib/python* && \ | ||
rm -rf /usr/sbin /usr/share/man | ||
|
||
USER acala | ||
|
||
EXPOSE 30333 9933 9944 9615 | ||
EXPOSE 30333 9933 9615 | ||
|
||
RUN mkdir /acala/data | ||
|
||
VOLUME ["/acala/data"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/acala"] | ||
ENTRYPOINT ["/usr/local/bin/acala"] |