build my base image

This commit is contained in:
zeaslity
2022-11-22 16:45:07 +08:00
parent 5de7b4a43e
commit 7da4d645b5
3 changed files with 119 additions and 21 deletions

26
server/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Base images that the image needs to depend on
FROM openjdk:11-jre-alpine
# The name of the maintainer
MAINTAINER super-wdd
# Set environment variables
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
# Set time zone
RUN set -eux; \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime; \
echo $TZ > /etc/timezone \
# Create Folder
RUN mkdir -p /wdd
# Define the work dir
WORKDIR /wdd
# Copy the jar and rename it
COPY ./target/server-*.jar /server.jar
# When the docker container starts, run the jar
ENTRYPOINT exec java ${JAVA_OPTS} -jar /wdd/lfs-admin.jar