forked from xiaoyi510/rustdesk-api-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DockerfileBuildx
41 lines (31 loc) · 1.41 KB
/
DockerfileBuildx
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
FROM --platform=$TARGETPLATFORM alpine:latest
LABEL maintainer="ronan <[email protected]>"
# The use of variables must be declared
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# time zone
ENV TZ=UTC
#5.Updated Alpine's software source to Alibaba Cloud, because pulling from the default official source is too slow
RUN echo http://mirrors.aliyun.com/alpine/v3.15/main/ > /etc/apk/repositories && \
echo http://mirrors.aliyun.com/alpine/v3.15/community/ >> /etc/apk/repositories && \
apk update && apk upgrade && apk add wget bash && \
apk add --update tzdata && cp /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo "$TZ" > /etc/timezone \
&& rm -rf /var/cache/apk/*
###############################################################################
# INSTALLATION
###############################################################################
# Define the directory where the app runs
ENV WORKDIR /app
# Import the file
ADD ./dist/rustdesk-api-server_${TARGETOS}_${TARGETARCH}/rustdesk-api-server $WORKDIR/rustdesk-api-server
# Copy the configuration file
COPY conf/app.conf /app/conf/app.conf
###############################################################################
# START
###############################################################################
WORKDIR /app
ENTRYPOINT ["./rustdesk-api-server"]
# Export port numbers
EXPOSE 21114