-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (44 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
52 lines (44 loc) · 1.24 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:22.04
# Install dependencies and avoid prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install Qt5, QTermWidget, libssh, build tools and X11 forwarding support
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libssh-dev \
pkg-config \
qt5-qmake \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
libqt5sql5-sqlite \
libqtermwidget5-0-dev \
libutf8proc-dev \
xauth \
x11-apps \
sshpass \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user for development
RUN useradd -ms /bin/bash devuser
USER devuser
WORKDIR /home/devuser
# Copy the source code (excluding build directories)
COPY --chown=devuser:devuser . /home/devuser/NeoSSH
WORKDIR /home/devuser/NeoSSH
# Clean any existing build files and rebuild from scratch
RUN rm -rf build cmake-build-debug && \
mkdir -p build && \
cd build && \
cmake .. && \
make -j$(nproc)
# Set environment variables for Qt/X11
ENV QT_X11_NO_MITSHM=1
ENV DISPLAY=:0
# Entry point - run the application
CMD ["./build/NeoSSH"]
# Usage instructions:
# 1. Build: docker build -t neossh .
# 2. Run with X11 forwarding:
# xhost +local:
# docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix neossh