forked from vladris/tinkerer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (29 loc) · 782 Bytes
/
Copy pathDockerfile
File metadata and controls
44 lines (29 loc) · 782 Bytes
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
FROM python:3.8-buster as builder
WORKDIR /tmp
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install pip -U \
&& pip3 install setuptools -U \
&& pip3 install babel nose
COPY . .
RUN python3 setup.py build \
&& python3 setup.py bdist_wheel \
&& ls -lR dist
FROM python:3.8-slim-buster
WORKDIR /tmp
ENV DEBIAN_FRONTEND noninteractive
COPY --from=builder /tmp/dist/*.whl .
RUN apt-get -y update \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install pip -U \
# && pip3 install setuptools -U \
&& pip3 install *.whl \
&& rm ./*
WORKDIR /blog
RUN groupadd -r tinker \
&& useradd -r -s /bin/bash -g tinker tinker
USER tinker
CMD ["tinker", "-h"]