blobba commited on
Commit
f5d46df
·
1 Parent(s): a35fccc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,16 +1,14 @@
1
- FROM ubuntu:latest
 
 
 
2
 
3
- # Install required packages
4
- RUN apt-get update && apt-get install -y curl bash
 
5
 
6
- # Fetch ttyd binary
7
- RUN curl -Lo ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64
8
-
9
- # Set permissions
10
- RUN chmod +x ttyd
11
-
12
- # Expose the desired port
13
  EXPOSE 7681
 
14
 
15
- # Start ttyd with the specified options
16
- CMD ["./ttyd", "--port", "7681", "bash"]
 
1
+ FROM ubuntu:18.04
2
+ RUN apt-get update && apt-get install -y autoconf automake curl cmake git libtool make \
3
+ && git clone --depth=1 https://github.com/tsl0922/ttyd.git /ttyd \
4
+ && cd /ttyd && env BUILD_TARGET=x86_64 ./scripts/cross-build.sh
5
 
6
+ FROM alpine
7
+ COPY --from=0 /ttyd/build/ttyd /usr/bin/ttyd
8
+ RUN apk add --no-cache bash tini
9
 
 
 
 
 
 
 
 
10
  EXPOSE 7681
11
+ WORKDIR /root
12
 
13
+ ENTRYPOINT ["/sbin/tini", "--"]
14
+ CMD ["ttyd", "bash"]