remove certain things and added stuff
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Use a minimal java image
|
||||||
|
FROM openjdk:21-jdk-slim
|
||||||
|
|
||||||
|
# Set the working directory inside the container
|
||||||
|
WORKDIR /work/
|
||||||
|
|
||||||
|
# Set proper permissions for user 1001
|
||||||
|
RUN chown 1001 /work \
|
||||||
|
&& chmod "g+rwX" /work
|
||||||
|
|
||||||
|
# Copy the entire Quarkus app folder and set ownership
|
||||||
|
COPY --chown=1001:root quarkus-app/ /work/quarkus-app
|
||||||
|
|
||||||
|
# Expose the application's port
|
||||||
|
EXPOSE 8090
|
||||||
|
|
||||||
|
# Switch to non-root user for better security
|
||||||
|
USER 1001
|
||||||
|
|
||||||
|
# Define the entrypoint to run the JAR
|
||||||
|
CMD ["java", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=8090", "-jar", "/work/quarkus-app/quarkus-run.jar"]
|
||||||
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -51,8 +51,8 @@ spec:
|
|||||||
- name: NEXUS_URL
|
- name: NEXUS_URL
|
||||||
value: "http://nexus-repo-nexus-repository-manager.default.svc.cluster.local:8081/repository/my-helm-repo/"
|
value: "http://nexus-repo-nexus-repository-manager.default.svc.cluster.local:8081/repository/my-helm-repo/"
|
||||||
|
|
||||||
- name: docker
|
- name: custom-docker
|
||||||
image: docker:dind
|
image: nexus-repo-nexus-repository-manager.default.svc.cluster.local:5000/custom-dind:latest
|
||||||
workingDir: /home/jenkins/agent
|
workingDir: /home/jenkins/agent
|
||||||
command: ["/bin/sh", "-c"]
|
command: ["/bin/sh", "-c"]
|
||||||
args: ["sleep 9999999"]
|
args: ["sleep 9999999"]
|
||||||
@@ -96,7 +96,7 @@ spec:
|
|||||||
}
|
}
|
||||||
stage('Retrieve docker Environment Variables') {
|
stage('Retrieve docker Environment Variables') {
|
||||||
steps {
|
steps {
|
||||||
container('docker') {
|
container('custom-docker') {
|
||||||
script {
|
script {
|
||||||
env.NEXUS_DOCKER_URL = sh(script: 'echo $NEXUS_DOCKER_URL', returnStdout: true).trim()
|
env.NEXUS_DOCKER_URL = sh(script: 'echo $NEXUS_DOCKER_URL', returnStdout: true).trim()
|
||||||
env.NEXUS_DOCKER_PASS = sh(script: 'echo $NEXUS_DOCKER_PASS', returnStdout: true).trim()
|
env.NEXUS_DOCKER_PASS = sh(script: 'echo $NEXUS_DOCKER_PASS', returnStdout: true).trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user