generated from hack-ink/rust-initializer
-
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
1 parent
3941171
commit ce4e71f
Showing
11 changed files
with
83 additions
and
41 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ubuntu:25.04 | ||
|
||
LABEL maintainer="x@acg.box" | ||
LABEL description="An environment for constructing a deterministic polkadot-sdk-based runtime." | ||
LABEL version="0.1.7" | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
ca-certificates \ | ||
clang \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
libssl-dev \ | ||
pkg-config \ | ||
protobuf-compiler \ | ||
rustup \ | ||
gosu \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | ||
ENV CARGO_TERM_COLOR=always | ||
ENV RUST_BACKTRACE=full | ||
ENV WASM_BUILD_WORKSPACE_HINT=/workdir | ||
|
||
WORKDIR /workdir | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
CMD ["/bin/bash"] |
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,20 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
DEFAULT_UID=1000 | ||
DEFAULT_GID=1000 | ||
|
||
HOST_UID="${HOST_UID:-}" | ||
HOST_GID="${HOST_GID:-}" | ||
|
||
if [ -z "$HOST_UID" ] || [ -z "$HOST_GID" ]; then | ||
echo "HOST_UID/HOST_GID are not set. Running as root." | ||
exec "$@" | ||
else | ||
echo "Running as UID=${HOST_UID}, GID=${HOST_GID}." | ||
|
||
groupadd -g "$HOST_GID" builder | ||
useradd -m -u "$HOST_UID" -g "$HOST_GID" builder | ||
|
||
exec gosu builder "$@" | ||
fi |
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