nobitaty55 commited on
Commit
0676bb9
·
verified ·
1 Parent(s): a3dff93

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -16
Dockerfile CHANGED
@@ -1,37 +1,38 @@
1
  FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
- ENV HOSTNAME=Nobita
 
5
 
6
- # ---- Install Everything in One Layer ----
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
- ca-certificates \
 
 
 
 
9
  curl \
10
  wget \
11
  git \
12
- sudo \
13
- dbus \
14
- cockpit \
15
- cockpit-machines \
16
- htop \
17
- btop \
18
  neovim \
19
- lsof \
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
  # ---- Install code-server ----
23
  RUN curl -fsSL https://code-server.dev/install.sh | sh
24
 
25
- # ---- Root Login Setup ----
26
- RUN echo "root:root" | chpasswd && \
27
- rm -f /etc/cockpit/disallowed-users || true
 
 
 
28
 
29
  WORKDIR /workspace
30
 
31
- EXPOSE 7860 9090
32
 
33
- # ---- Startup Script ----
34
  CMD bash -c "\
35
  service dbus start && \
36
- service cockpit start && \
37
  code-server --bind-addr 0.0.0.0:7860 --auth none"
 
1
  FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV USER=root
5
+ ENV PASSWORD=root
6
 
7
+ # ---- Install Desktop + XRDP + Tools ----
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ xfce4 \
10
+ xfce4-goodies \
11
+ xrdp \
12
+ dbus-x11 \
13
+ sudo \
14
  curl \
15
  wget \
16
  git \
 
 
 
 
 
 
17
  neovim \
18
+ htop \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
  # ---- Install code-server ----
22
  RUN curl -fsSL https://code-server.dev/install.sh | sh
23
 
24
+ # ---- Root password ----
25
+ RUN echo "$USER:$PASSWORD" | chpasswd
26
+
27
+ # ---- XRDP Fix ----
28
+ RUN echo "startxfce4" > /root/.xsession
29
+ RUN sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
30
 
31
  WORKDIR /workspace
32
 
33
+ EXPOSE 7860 3390
34
 
 
35
  CMD bash -c "\
36
  service dbus start && \
37
+ service xrdp start && \
38
  code-server --bind-addr 0.0.0.0:7860 --auth none"