Skip to content

Commit 0da9624

Browse files
authored
Merge pull request #36 from elyezer/update-dockerfile
Update Dockerfile
2 parents bb12a4a + 548863c commit 0da9624

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

packaging/docker/Dockerfile

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
1-
FROM centos:8
1+
FROM fedora:31
22

3-
ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini /bin/tini
3+
ADD dist/receptor-*.whl /tmp/
4+
ADD https://github.com/krallin/tini/releases/latest/download/tini /bin/tini
45
ADD packaging/docker/entrypoint.sh /bin/entrypoint
56
ADD packaging/docker/receptor.conf /tmp/receptor.conf
6-
RUN yum install -y python36 python3-dateutil
7-
ADD dist/receptor-0.1.0-py2.py3-none-any.whl /tmp/receptor-0.1.0-py2.py3-none-any.whl
8-
RUN pip3 install /tmp/receptor-0.1.0-py2.py3-none-any.whl
9-
RUN mkdir -p /receptor && \
10-
chmod +x /bin/tini /bin/entrypoint && \
7+
8+
RUN dnf update -y &&\
9+
dnf install -y python3 python3-pip &&\
10+
dnf clean all
11+
12+
RUN chmod +x /bin/tini /bin/entrypoint &&\
1113
rm -rf /var/cache/yum
12-
VOLUME /receptor
14+
15+
RUN pip3 install --no-cache-dir python-dateutil &&\
16+
pip3 install --no-cache-dir /tmp/receptor-*.whl &&\
17+
rm /tmp/receptor-*.whl
18+
19+
RUN mkdir /var/lib/receptor
20+
VOLUME /var/lib/receptor
21+
1322
ENV LANG=en_US.UTF-8
1423
ENV LANGUAGE=en_US:en
1524
ENV LC_ALL=en_US.UTF-8
16-
ENV HOME=/receptor
25+
ENV HOME=/var/lib/receptor
1726
EXPOSE 8888/tcp
18-
WORKDIR /receptor
27+
WORKDIR /var/lib/receptor
1928
ENTRYPOINT ["entrypoint"]
20-
CMD ["receptor", "-c", "/receptor/receptor.conf", "node"]
29+
CMD ["receptor", "-c", "/var/lib/receptor/receptor.conf", "node"]

packaging/docker/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ EOF
1515
rm /tmp/passwd
1616
fi
1717

18-
if [ ! -f /receptor/receptor.conf ]; then
19-
cp /tmp/receptor.conf /receptor/receptor.conf
18+
if [ ! -f /var/lib/receptor/receptor.conf ]; then
19+
cp /tmp/receptor.conf /var/lib/receptor/receptor.conf
2020
fi
2121

2222
exec tini -- "${@}"

0 commit comments

Comments
 (0)