-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Dockerfile to use gotty instead of ttyd for running btop
- Loading branch information
1 parent
4dd1d49
commit 0f38b2b
Showing
2 changed files
with
48 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
FROM debian:latest | ||
|
||
# Install required packages for building ttyd and running btop | ||
# Install required packages for building gotty and running btop | ||
RUN apt-get update && apt-get install -y \ | ||
btop \ | ||
procps \ | ||
curl \ | ||
iproute2 \ | ||
git \ | ||
cmake \ | ||
g++ \ | ||
pkg-config \ | ||
libjson-c-dev \ | ||
libwebsockets-dev \ | ||
&& apt-get clean | ||
golang-go \ | ||
&& apt-get clean \ | ||
vim | ||
|
||
# Clone, build, and install ttyd | ||
RUN git clone https://github.com/tsl0922/ttyd.git /tmp/ttyd && \ | ||
cd /tmp/ttyd && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make && \ | ||
make install && \ | ||
# Clone, build, and install gotty | ||
RUN git clone https://github.com/sorenisanerd/gotty.git /tmp/gotty && \ | ||
cd /tmp/gotty && \ | ||
go build && \ | ||
mv gotty /usr/local/bin/ && \ | ||
cd / && \ | ||
rm -rf /tmp/ttyd | ||
rm -rf /tmp/gotty | ||
|
||
# Set the terminal to support UTF-8 | ||
ENV LANG C.UTF-8 | ||
|
||
# Expose the port ttyd will run on | ||
# Expose the port gotty will run on | ||
EXPOSE 7681 | ||
|
||
# Start ttyd and run btop | ||
CMD ["ttyd", "-p", "7681", "btop"] | ||
# Start gotty and run btop | ||
CMD ["gotty", "-p", "7681", "-w", "btop"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM debian:latest | ||
|
||
# Install required packages for building ttyd and running btop | ||
RUN apt-get update && apt-get install -y \ | ||
btop \ | ||
procps \ | ||
curl \ | ||
iproute2 \ | ||
git \ | ||
cmake \ | ||
g++ \ | ||
pkg-config \ | ||
libjson-c-dev \ | ||
libwebsockets-dev \ | ||
&& apt-get clean | ||
|
||
# Clone, build, and install ttyd | ||
RUN git clone https://github.com/tsl0922/ttyd.git /tmp/ttyd && \ | ||
cd /tmp/ttyd && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make && \ | ||
make install && \ | ||
cd / && \ | ||
rm -rf /tmp/ttyd | ||
|
||
# Set the terminal to support UTF-8 | ||
ENV LANG C.UTF-8 | ||
|
||
# Expose the port ttyd will run on | ||
EXPOSE 7681 | ||
|
||
# Start ttyd and run btop | ||
CMD ["ttyd", "-p", "7681", "-W", "btop"] |