-
Notifications
You must be signed in to change notification settings - Fork 1
/
jar.ubuntu.Dockerfile
37 lines (30 loc) · 1.61 KB
/
jar.ubuntu.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
FROM eclipse-temurin:8-jammy
LABEL author="alex <[email protected]>"
RUN set -eux; \
GITHUB_BASE_URL=https://raw.githubusercontent.com/xalexec/Auto-Set-JAVA_OPTS/master/;\
curl -LfsSo entrypoint.sh ${GITHUB_BASE_URL}entrypoint.sh; \
curl -LfsSo checksum ${GITHUB_BASE_URL}checksum; \
echo "`cat checksum` entrypoint.sh" | sha256sum --strict --check -;\
rm -rf checksum;
VOLUME /data
RUN set -eux; \
echo 'deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse\
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse\
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse\
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse\
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse\
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse\
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse\
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse\
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse\
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse' > /etc/apt/sources.list; \
apt-get update; \
# 设置时区
apt-get install -y --no-install-recommends tzdata; \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
rm -rf /var/lib/apt/lists/*; \
rm -rf webapps/*;
# 拷 war 包
COPY app.jar app.jar
CMD ["sh", "entrypoint.sh"]
EXPOSE 8080