-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (26 loc) · 805 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (26 loc) · 805 Bytes
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
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
qemu-system-x86 \
qemu-utils \
wget \
gzip \
sudo \
openssh-server \
&& rm -rf /var/lib/apt/lists/*
ENV USER=container
ENV HOME=/home/container
ENV SERVER_MEMORY=2048
ENV SERVER_PORT=2222
RUN adduser --disabled-password --home /home/container container \
&& echo "container ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
WORKDIR $HOME
# RUN wget -O ubuntu-22.qcow2.gz "https://github.com/ma4z-sys/LumenVM/releases/download/ubuntu-22/ubuntu-22.qcow2.gz" \
# && gunzip ubuntu-22.qcow2.gz
VOLUME ["$HOME/data"]
EXPOSE $SERVER_PORT
CMD ["sh", "-c", "qemu-system-x86_64 \
-hda jammy-server-cloudimg-arm64.img \
-m ${SERVER_MEMORY} \
-net user,hostfwd=tcp::${SERVER_PORT}-:22 \
-net nic \
-nographic"]