fixed rust image
This commit is contained in:
@@ -1,21 +1,41 @@
|
|||||||
FROM --platform=$TARGETOS/$TARGETARCH node:18-slim
|
FROM node:22-slim
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN dpkg --add-architecture i386 \
|
RUN dpkg --add-architecture i386 \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt upgrade -y \
|
&& apt upgrade -y
|
||||||
&& apt install -y lib32gcc-s1 lib32stdc++6 unzip curl iproute2 tzdata libgdiplus libsdl2-2.0-0:i386 \
|
|
||||||
&& mkdir /wrapper \
|
|
||||||
&& npm install --prefix /wrapper ws \
|
|
||||||
&& useradd -d /home/container -m container
|
|
||||||
|
|
||||||
|
RUN apt install -y \
|
||||||
|
lib32gcc-s1 \
|
||||||
|
lib32stdc++6 \
|
||||||
|
locales \
|
||||||
|
unzip \
|
||||||
|
curl \
|
||||||
|
iproute2 \
|
||||||
|
tzdata \
|
||||||
|
libgdiplus \
|
||||||
|
libsdl2-2.0-0:i386
|
||||||
|
|
||||||
|
RUN mkdir /wrapper \
|
||||||
|
&& npm install --prefix /wrapper ws
|
||||||
|
|
||||||
|
# Set the locale
|
||||||
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
||||||
|
locale-gen
|
||||||
|
ENV LANG=en_US.UTF-8
|
||||||
|
ENV LANGUAGE=en_US:en
|
||||||
|
ENV LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
## Setup user and working directory
|
||||||
|
RUN useradd -m -d /home/container -s /bin/bash container
|
||||||
USER container
|
USER container
|
||||||
ENV USER=container HOME=/home/container
|
ENV USER=container HOME=/home/container
|
||||||
|
|
||||||
WORKDIR /home/container
|
WORKDIR /home/container
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
COPY ./wrapper.js /wrapper/wrapper.js
|
COPY --chown=container:container ./wrapper.js /wrapper/wrapper.js
|
||||||
|
RUN chmod +x /wrapper/wrapper.js
|
||||||
|
|
||||||
CMD [ "/bin/bash", "/entrypoint.sh" ]
|
CMD [ "/bin/bash", "/entrypoint.sh" ]
|
@@ -1,8 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /home/container
|
|
||||||
|
|
||||||
# Make internal Docker IP address available to processes.
|
# Wait for the container to fully initialize
|
||||||
export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'`
|
sleep 1
|
||||||
|
|
||||||
|
# Default the TZ environment variable to UTC.
|
||||||
|
TZ=${TZ:-UTC}
|
||||||
|
export TZ
|
||||||
|
|
||||||
|
# Set environment variable that holds the Internal Docker IP
|
||||||
|
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||||
|
export INTERNAL_IP
|
||||||
|
|
||||||
|
# Switch to the container's working directory
|
||||||
|
cd /home/container || exit 1
|
||||||
|
|
||||||
## if auto_update is not set or to 1 update
|
## if auto_update is not set or to 1 update
|
||||||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
||||||
@@ -13,7 +23,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Replace Startup Variables
|
# Replace Startup Variables
|
||||||
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
|
MODIFIED_STARTUP=$(eval echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||||
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
||||||
|
|
||||||
if [[ "${FRAMEWORK}" == "carbon" ]]; then
|
if [[ "${FRAMEWORK}" == "carbon" ]]; then
|
||||||
|
Reference in New Issue
Block a user