-
Notifications
You must be signed in to change notification settings - Fork 13
/
goreleaser.Dockerfile
43 lines (29 loc) · 1.05 KB
/
goreleaser.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
FROM debian:buster-slim
ARG TARGETPLATFORM
WORKDIR /app
COPY . .
RUN set -ex \
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=amd64; fi \
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=arm64; fi \
&& mv tdex /usr/local/bin/tdex \
&& mv "tdexd-linux-$TARGETPLATFORM" /usr/local/bin/tdexd \
&& mv "tdex-migration-linux-$TARGETPLATFORM" /usr/local/bin/tdex-migration
# $USER name, and data $DIR to be used in the `final` image
ARG USER=tdex
ARG DIR=/home/tdex
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
# NOTE: Default GID == UID == 1000
RUN adduser --disabled-password \
--home "$DIR/" \
--gecos "" \
"$USER"
USER $USER
COPY web/layout.html web/layout.html
# Prevents `VOLUME $DIR/.tdex-daemon/` being created as owned by `root`
RUN mkdir -p "$DIR/.tdex-daemon/"
# Expose volume containing all `tdexd` data
VOLUME $DIR/.tdex-daemon/
# expose trader and operator interface ports
EXPOSE 9945
EXPOSE 9000
ENTRYPOINT ["tdexd"]