Update Dockerfile and commander.py

This commit is contained in:
Richard Bronkhorst 2023-06-11 21:17:50 +02:00
parent af73939e03
commit 2346b610a3
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.10 FROM python:3
RUN useradd -ms /bin/bash user RUN useradd -ms /bin/bash user
RUN mkdir /data && chown user /data RUN mkdir /data && chown user /data
USER user USER user
@ -6,7 +6,7 @@ ADD --chown=user requirements.txt /app/requirements.txt
WORKDIR /app WORKDIR /app
RUN pip3 install -r requirements.txt RUN pip3 install -r requirements.txt
ADD --chown=user . /app ADD --chown=user . /app
RUN chmod +x /app/main.py RUN chmod +x /app/commander.py
VOLUME /data VOLUME /data
ENTRYPOINT [ "python3", "/app/main.py"] ENTRYPOINT [ "python3", "/app/main.py"]
CMD ["-s", "/data/"] CMD ["-s", "/data/"]

View File

@ -56,6 +56,7 @@ class Commander(CommandLine):
for w in waypoints: for w in waypoints:
if 'MARKETPLACE' in w.traits: if 'MARKETPLACE' in w.traits:
self.api.marketplace(w) self.api.marketplace(w)
print(f'marketplace at {w}')
sleep(0.5) sleep(0.5)
def all_waypoints(self, systems): def all_waypoints(self, systems):
@ -64,6 +65,7 @@ class Commander(CommandLine):
break break
r = self.api.list_waypoints(s) r = self.api.list_waypoints(s)
print(f'system {s}: {len(r)} waypoints') print(f'system {s}: {len(r)} waypoints')
self.all_specials(r)
sleep(0.5) sleep(0.5)
def all_systems(self): def all_systems(self):