A docker image with ts-node for Pterodactyl.
This was created based on Pterodactyl's documentation here.
FROM node
RUN adduser --disabled-password --home /home/container container --gecos "" \
&& npm config set update-notifier false \
&& npm install -g ts-node
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
#!/bin/bash
cd /home/container
# Output Current ts-node Version
ts-node -v
# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
${MODIFIED_STARTUP}
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2022-04-11T12:06:55-04:00",
"name": "ts-node",
"author": "[email protected]",
"description": "ts-node",
"features": null,
"images": [
"readie\/pterodactyl-ts-node"
],
"file_denylist": [],
"startup": "ts-node --max-old-space-size={{SERVER_MEMORY}} {{SCRIPT}} && npm i > \/dev\/null 2>&1",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"[Pterodactyl] Ready\"\r\n}",
"logs": "{\r\n \"custom\": false,\r\n \"location\": \"logs\/latest.log\"\r\n}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": null,
"container": "alpine:3.4",
"entrypoint": "ash"
}
},
"variables": [
{
"name": "Script Name",
"description": "Script name or path",
"env_variable": "SCRIPT",
"default_value": "index.ts",
"user_viewable": true,
"user_editable": true,
"rules": "required|string"
}
]
}
Content type
Image
Digest
Size
376.6 MB
Last updated
over 4 years ago
docker pull readie/pterodactyl-ts-node