complete CI - 4
This commit is contained in:
32
.github/workflows/build-push-docker.yml
vendored
32
.github/workflows/build-push-docker.yml
vendored
@@ -141,20 +141,20 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.docker_tags_server.outputs.tags }}
|
tags: ${{ steps.docker_tags_server.outputs.tags }}
|
||||||
|
|
||||||
# - name: Build and push Docker images - [ Agent ]
|
- name: Build and push Docker images - [ Agent ]
|
||||||
# id: docker_build_agent
|
id: docker_build_agent
|
||||||
# # You may pin to the exact commit or the version.
|
# You may pin to the exact commit or the version.
|
||||||
# # uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
# uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
||||||
# uses: docker/build-push-action@v3.2.0
|
uses: docker/build-push-action@v3.2.0
|
||||||
# with:
|
with:
|
||||||
# context: ./
|
context: ./
|
||||||
# # Path to the Dockerfile
|
# Path to the Dockerfile
|
||||||
# file: ./agent/Dockerfile
|
file: ./agent/Dockerfile
|
||||||
# # List of target platforms for build
|
# List of target platforms for build
|
||||||
# platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
# # Always attempt to pull all referenced images
|
# Always attempt to pull all referenced images
|
||||||
# pull: false
|
pull: false
|
||||||
# # Push is a shorthand for --output=type=registry
|
# Push is a shorthand for --output=type=registry
|
||||||
# push: true
|
push: true
|
||||||
# tags: ${{ steps.docker_tags_agent.outputs.tags }}
|
tags: ${{ steps.docker_tags_agent.outputs.tags }}
|
||||||
|
|
||||||
|
|||||||
23
agent/Dockerfile
Normal file
23
agent/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
# Base images that the image needs to depend on
|
||||||
|
FROM icederce/eclipse-temurin-11-jre-focal
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms2028m -Xmx2048m"
|
||||||
|
|
||||||
|
# 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 ./agent/target/agent-*.jar /wdd/agent.jar
|
||||||
|
|
||||||
|
# When the docker container starts, run the jar
|
||||||
|
ENTRYPOINT exec java ${JAVA_OPTS} -jar /wdd/agent.jar
|
||||||
Reference in New Issue
Block a user