-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (33 loc) · 1.2 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
FROM ubuntu:22.04
ARG BRAND=unspecified
ARG DOMAIN=unspecified
ARG BUILD_OPEND_VERSION=8.8.4818
ARG OPEND_DIR=/opend
ARG BIN_NAME=OpenD
# metadata
LABEL org.opencontainers.image.maintainer="ChasenLbas <[email protected]>"
LABEL org.opencontainers.image.description="${BRAND} OpenD Docker Image"
# xxxx_OpenD_8.8.4818_Ubuntu16.04.tar.gz
ARG OPEND_PREFIX=${BRAND}_OpenD_${BUILD_OPEND_VERSION}_Ubuntu16.04
ARG OPEND_FILE=${OPEND_PREFIX}.tar.gz
# Download OpenD package
# https://softwaredownload.futunn.com/Futu_OpenD_8.8.4818_Ubuntu16.04.tar.gz
# https://softwaredownload.futustatic.com/moomoo_OpenD_8.8.4818_Ubuntu16.04.tar.gz
ARG OPEND_URL=https://softwaredownload.${DOMAIN}/${OPEND_FILE}
ENV OPEND_VERSION ${BUILD_OPEND_VERSION}
ENV LANG C.UTF-8
ENV OPEND_BIN ${OPEND_DIR}/${BIN_NAME}
COPY docker-entrypoint.sh .
WORKDIR ${OPEND_DIR}
RUN apt-get update && apt-get install -y \
curl \
tar \
telnet \
&& curl -o /tmp/opend.tar.gz ${OPEND_URL} \
&& tar -zxvf /tmp/opend.tar.gz -C /tmp/ \
&& mkdir -p ${OPEND_DIR} \
&& ls /tmp/ \
&& cp -r /tmp/${OPEND_PREFIX}/${OPEND_PREFIX}/* ${OPEND_DIR} \
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
CMD ["/docker-entrypoint.sh"]