feat: add dart-lang image

This commit is contained in:
devnote-dev
2022-10-09 20:17:52 +01:00
parent f439d16e4f
commit b50c2d57de
4 changed files with 75 additions and 0 deletions

16
dart/entrypoint.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
cd /home/container
# Make internal Docker IP address available to processes
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP
# Print Dart version
dart --version
# Replace startup variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the server
eval ${MODIFIED_STARTUP}