Update Dockerfile
Browse files- Dockerfile +21 -7
Dockerfile
CHANGED
@@ -1,12 +1,26 @@
|
|
1 |
-
# Use an official
|
2 |
-
FROM
|
3 |
|
4 |
-
# Install
|
5 |
-
RUN
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
EXPOSE 7681
|
10 |
|
11 |
-
#
|
12 |
CMD ["ttyd", "bash"]
|
|
|
1 |
+
# Use an official Ubuntu base image
|
2 |
+
FROM ubuntu:latest
|
3 |
|
4 |
+
# Install dependencies
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y \
|
7 |
+
build-essential \
|
8 |
+
cmake \
|
9 |
+
git \
|
10 |
+
libjson-c-dev \
|
11 |
+
libwebsockets-dev
|
12 |
|
13 |
+
# Clone the ttyd repository and build it
|
14 |
+
RUN git clone https://github.com/tsl0922/ttyd.git && \
|
15 |
+
cd ttyd && \
|
16 |
+
mkdir build && \
|
17 |
+
cd build && \
|
18 |
+
cmake .. && \
|
19 |
+
make && \
|
20 |
+
make install
|
21 |
+
|
22 |
+
# Expose the port ttyd will run on
|
23 |
EXPOSE 7681
|
24 |
|
25 |
+
# Command to run ttyd
|
26 |
CMD ["ttyd", "bash"]
|