-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
46 lines (41 loc) · 1.81 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM debian:buster-slim
ARG username=panoptes
ARG incoming_dir=/incoming
ARG outgoing_dir=/outgoing
ARG DEBIAN_FRONTEND=noninteractive
ENV INCOMING_DIR=$incoming_dir
ENV OUTGOING_DIR=$outgoing_dir
ENV SOLVE_OPTS="--guess-scale --no-verify --downsample 4 --temp-axy --no-plots --dir $outgoing_dir"
ADD http://data.astrometry.net/4100/index-4110.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4111.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4112.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4113.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4114.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4115.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4116.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4117.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4118.fits /usr/share/astrometry/
ADD http://data.astrometry.net/4100/index-4119.fits /usr/share/astrometry/
RUN apt-get update && \
apt-get install --no-install-recommends -y \
wget ca-certificates bzip2 vim-tiny \
dcraw exiftool libcfitsio-bin \
astrometry.net inotify-tools python3-pip \
&& \
# Add user.
useradd -ms /bin/bash ${username} && \
# Set up directories.
mkdir "${incoming_dir}" && \
mkdir "${outgoing_dir}" && \
chown -R ${username}:${username} "${incoming_dir}" && \
chown -R ${username}:${username} "${outgoing_dir}" && \
chown -R ${username}:${username} /usr/share/astrometry && \
# Cleanup
apt-get autoremove --purge -y && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
USER ${username}
WORKDIR /app
COPY watcher.sh .
RUN pip3 install -U pip && pip3 install "panoptes-utils[images]"
CMD ["/bin/bash", "watcher.sh"]