Update Dockerfile
Browse files- Dockerfile +35 -59
Dockerfile
CHANGED
@@ -1,59 +1,35 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
&&
|
23 |
-
&&
|
24 |
-
&&
|
25 |
-
&&
|
26 |
-
&&
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
RUN
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
git \
|
37 |
-
locales \
|
38 |
-
pavucontrol \
|
39 |
-
pulseaudio \
|
40 |
-
pulseaudio-utils \
|
41 |
-
sudo \
|
42 |
-
x11-xserver-utils \
|
43 |
-
xfce4 \
|
44 |
-
xfce4-goodies \
|
45 |
-
xfce4-pulseaudio-plugin \
|
46 |
-
xorgxrdp \
|
47 |
-
xrdp \
|
48 |
-
xubuntu-icon-theme \
|
49 |
-
&& rm -rf /var/lib/apt/lists/*
|
50 |
-
|
51 |
-
RUN sed -i -E 's/^; autospawn =.*/autospawn = yes/' /etc/pulse/client.conf \
|
52 |
-
&& [ -f /etc/pulse/client.conf.d/00-disable-autospawn.conf ] && sed -i -E 's/^(autospawn=.*)/# \1/' /etc/pulse/client.conf.d/00-disable-autospawn.conf || : \
|
53 |
-
&& locale-gen en_US.UTF-8
|
54 |
-
ENV LANG en_US.UTF-8
|
55 |
-
|
56 |
-
COPY --from=builder /usr/lib/pulse-*/modules/module-xrdp-sink.so /usr/lib/pulse-*/modules/module-xrdp-source.so /var/lib/xrdp-pulseaudio-installer/
|
57 |
-
COPY entrypoint.sh /usr/bin/entrypoint
|
58 |
-
EXPOSE 3389/tcp
|
59 |
-
ENTRYPOINT ["/usr/bin/entrypoint"]
|
|
|
1 |
+
# Use the official Debian Bullseye Slim base image
|
2 |
+
FROM debian:bullseye-slim
|
3 |
+
|
4 |
+
# Install sudo and clean up the package manager cache
|
5 |
+
RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*
|
6 |
+
|
7 |
+
# Create a non-root user and add it to the sudo group
|
8 |
+
RUN useradd -m user && echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user
|
9 |
+
|
10 |
+
# Switch to the non-root user
|
11 |
+
USER user
|
12 |
+
|
13 |
+
# Set the working directory to the user's home directory
|
14 |
+
WORKDIR /home/user
|
15 |
+
|
16 |
+
# Install Curl
|
17 |
+
RUN sudo apt-get update && sudo apt-get install -y curl && sudo rm -rf /var/lib/apt/lists/*
|
18 |
+
|
19 |
+
# Download the latest version of Ninja from GitHub
|
20 |
+
RUN version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/gngpp/ninja/releases/latest)) \
|
21 |
+
&& base_url="https://github.com/gngpp/ninja/releases/expanded_assets/$version" \
|
22 |
+
&& latest_url=https://github.com/$(curl -sL $base_url | grep -oP 'href=".*x86_64.*musl\.tar\.gz(?=")' | sed 's/href="//') \
|
23 |
+
&& curl -Lo ninja.tar.gz $latest_url \
|
24 |
+
&& tar -xzf ninja.tar.gz \
|
25 |
+
&& sudo cp ninja /bin/ninja \
|
26 |
+
&& rm -f ninja.tar.gz ninja
|
27 |
+
|
28 |
+
# Set the Chinese language environment and do not interact with APT
|
29 |
+
ENV LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive LANG=en-US.UTF-8 LANGUAGE=en-US.UTF-8 LC_ALL=C
|
30 |
+
|
31 |
+
# Create necessary folders and set access rights
|
32 |
+
RUN sudo mkdir -p /.gpt3 /.gpt4 /.auth /.platform && sudo chmod 777 /.gpt3 /.gpt4 /.auth /.platform
|
33 |
+
|
34 |
+
# By default when running an image, it will run ninja
|
35 |
+
CMD ["/bin/sh", "-c", "/bin/ninja run >> /dev/null 2>&1"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|