add get timezone
This commit is contained in:
parent
48d8e3fe5b
commit
dbae5b0eab
|
@ -27,6 +27,5 @@ WORKDIR /app
|
|||
RUN npm install
|
||||
|
||||
# Grab the current local timezone from an external api and save it into /etc/timezone, otherwise Tor will complain and won't start
|
||||
RUN bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
CMD npm start
|
||||
CMD bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && npm start
|
1
bin/get-timezone.sh
Normal file
1
bin/get-timezone.sh
Normal file
|
@ -0,0 +1 @@
|
|||
curl -sL http://ip-api.com/json | node -e "process.stdin.resume(); process.stdin.on('data', (data) => { process.stdout.write(JSON.parse(data.toString('utf8')).timezone); process.exit(0); });"
|
Loading…
Reference in a new issue