forked from lncm/docker-specter-desktop
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
62 lines (41 loc) · 1.53 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
ARG VERSION=v0.8.1
ARG REPO=https://github.com/cryptoadvance/specter-desktop
ARG USER=specter
ARG DIR=/data/
FROM python:3.8.5-slim-buster AS builder
ARG VERSION
ARG REPO
RUN apt update && apt install -y git build-essential libusb-1.0-0-dev libudev-dev libffi-dev libssl-dev
WORKDIR /
RUN git clone $REPO
WORKDIR /specter-desktop
RUN git checkout $VERSION
RUN sed -i "s/vx.y.z-get-replaced-by-release-script/${VERSION}/g; " setup.py
RUN pip3 install .
FROM python:3.8.5-slim-buster as final
ARG USER
ARG DIR
LABEL maintainer="k9ert ([email protected])"
RUN apt update && apt install -y libusb-1.0-0-dev libudev-dev
# NOTE: Default GID == UID == 1000
RUN adduser --disabled-password \
--home "$DIR" \
--gecos "" \
"$USER"
# Set user
USER $USER
# Make config directory
RUN mkdir -p "$DIR/.specter/"
# Copy over python stuff
COPY --from=builder /usr/local/lib/python3.8 /usr/local/lib/python3.8
COPY --from=builder /usr/local/bin /usr/local/bin
# Expose ports
EXPOSE 25441 25442 25443
ENTRYPOINT ["/usr/local/bin/python3", "-m", "cryptoadvance.specter", "server"]