Add rust language
This commit is contained in:
14
rust/1.31/Dockerfile
Normal file
14
rust/1.31/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH rust:1.31-slim
|
||||
|
||||
LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com"
|
||||
|
||||
RUN apt update \
|
||||
&& apt -y install git dnsutils curl iproute2 ffmpeg \
|
||||
&& useradd -m -d /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
14
rust/1.56/Dockerfile
Normal file
14
rust/1.56/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH rust:1.56-slim
|
||||
|
||||
LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com"
|
||||
|
||||
RUN apt update \
|
||||
&& apt -y install git dnsutils curl iproute2 ffmpeg \
|
||||
&& useradd -m -d /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
14
rust/1.60/Dockerfile
Normal file
14
rust/1.60/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH rust:1.60-slim
|
||||
|
||||
LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com"
|
||||
|
||||
RUN apt update \
|
||||
&& apt -y install git dnsutils curl iproute2 ffmpeg \
|
||||
&& useradd -m -d /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
15
rust/entrypoint.sh
Normal file
15
rust/entrypoint.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
cd /home/container
|
||||
|
||||
# Make internal Docker IP address available to processes.
|
||||
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
|
||||
|
||||
# Print current Rust version
|
||||
cargo --version
|
||||
|
||||
# Replace Startup Variables
|
||||
MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
|
||||
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
|
||||
|
||||
# Run the Server
|
||||
eval ${MODIFIED_STARTUP}
|
14
rust/latest/Dockerfile
Normal file
14
rust/latest/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH rust:slim
|
||||
|
||||
LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com"
|
||||
|
||||
RUN apt update \
|
||||
&& apt -y install git dnsutils curl iproute2 ffmpeg \
|
||||
&& useradd -m -d /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
Reference in New Issue
Block a user