forked from tsl0922/ttyd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f6a6c7
commit 98362e2
Showing
29 changed files
with
4,760 additions
and
5,345 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Cmake files | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
cmake_install.cmake | ||
install_manifest.txt | ||
CTestTestfile.cmake | ||
build | ||
|
||
# Files not required for build | ||
.git | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
config.json | ||
html | ||
screenshot.gif |
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,5 +1,4 @@ | ||
FROM ubuntu:16.04 | ||
LABEL maintainer "Shuanglei Tao - [email protected]" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
|
@@ -16,7 +15,7 @@ RUN apt-get update \ | |
libwebsockets-dev \ | ||
pkg-config \ | ||
vim-common \ | ||
&& git clone --depth=1 https://github.com/tsl0922/ttyd.git /tmp/ttyd \ | ||
&& git clone --depth=1 https://github.com/santosh0705/ttyd-express.git /tmp/ttyd \ | ||
&& cd /tmp/ttyd && mkdir build && cd build \ | ||
&& cmake -DCMAKE_BUILD_TYPE=RELEASE .. \ | ||
&& make \ | ||
|
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,54 @@ | ||
FROM alpine:3.8 as builder | ||
|
||
COPY . /ttyd-express/ | ||
|
||
RUN set -exo pipefail; \ | ||
\ | ||
apk add --update --no-cache \ | ||
autoconf automake bash bsd-compat-headers linux-headers \ | ||
build-base ca-certificates cmake curl file g++ libtool vim; \ | ||
\ | ||
curl -sLo- https://github.com/json-c/json-c/archive/json-c-0.13.1-20180305.tar.gz | tar xz; \ | ||
cd json-c-json-c-0.13.1-20180305; \ | ||
env CFLAGS=-fPIC ./configure; \ | ||
make install; \ | ||
cd ..; \ | ||
\ | ||
curl -sLo- https://zlib.net/zlib-1.2.11.tar.gz | tar xz; \ | ||
cd zlib-1.2.11; \ | ||
./configure; \ | ||
make install; \ | ||
cd ..; \ | ||
\ | ||
curl -sLo- https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.4.tar.gz | tar xz; \ | ||
cd libressl-2.7.4; \ | ||
cmake -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF; \ | ||
make install; \ | ||
cd ..; \ | ||
\ | ||
curl -sLo- https://github.com/warmcat/libwebsockets/archive/v3.0.1.tar.gz | tar xz; \ | ||
cd libwebsockets-3.0.1; \ | ||
cmake -DLWS_WITHOUT_TESTAPPS=ON -DLWS_STATIC_PIC=ON -DLWS_UNIX_SOCK=ON; \ | ||
make install; \ | ||
cd ..; \ | ||
sed -i 's/ websockets_shared//' /usr/local/lib/cmake/libwebsockets/LibwebsocketsConfig.cmake; \ | ||
\ | ||
cd /ttyd-express; \ | ||
sed -i '5s;^;\nSET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")\nSET(CMAKE_EXE_LINKER_FLAGS "-static")\n;' CMakeLists.txt; \ | ||
cmake .; \ | ||
make; \ | ||
make install; \ | ||
strip -s /usr/local/bin/ttyd; | ||
|
||
FROM alpine:3.8 | ||
|
||
COPY --from=builder /usr/local/bin/ttyd /usr/bin/ttyd | ||
|
||
RUN set -ex; \ | ||
apk add --no-cache \ | ||
dropbear-dbclient; \ | ||
chmod +x /usr/bin/ttyd | ||
|
||
CMD ["/bin/sh"] | ||
|
||
ENTRYPOINT ["/usr/bin/ttyd"] |
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
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,22 @@ | ||
{ | ||
"listen": { | ||
"port": 3000, | ||
"ip": "127.0.0.1" | ||
}, | ||
"terminal": { | ||
"cursorBlink": true, | ||
"cursorStyle": "underline", | ||
"scrollback": 1000, | ||
"tabStopWidth": 8, | ||
"bellStyle": "sound" | ||
}, | ||
"service": { | ||
"/": { | ||
"command": "/bin/login" | ||
}, | ||
"/ssh/": { | ||
"command": "/usr/bin/ssh", | ||
"args": ["{user}@{host}"] | ||
} | ||
} | ||
} |
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,3 @@ | ||
{ | ||
"extends": "standard" | ||
} |
Binary file not shown.
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,16 +1,16 @@ | ||
const gulp = require('gulp'), | ||
clean = require('gulp-clean'), | ||
inlinesource = require('gulp-inline-source'); | ||
const gulp = require('gulp') | ||
const clean = require('gulp-clean') | ||
const inlinesource = require('gulp-inline-source') | ||
|
||
gulp.task('clean', function () { | ||
return gulp.src('dist', {read: false}) | ||
.pipe(clean()); | ||
}); | ||
return gulp.src('dist', { read: false, allowEmpty: true }) | ||
.pipe(clean()) | ||
}) | ||
|
||
gulp.task('inlinesource', function () { | ||
return gulp.src('dist/index.html') | ||
.pipe(inlinesource()) | ||
.pipe(gulp.dest('../src/')); | ||
}); | ||
return gulp.src('dist/index.html') | ||
.pipe(inlinesource()) | ||
.pipe(gulp.dest('../src/')) | ||
}) | ||
|
||
gulp.task('default', ['inlinesource']); | ||
gulp.task('default', gulp.parallel('inlinesource')) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.