Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy build argument to dockerfiles #533

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
2 changes: 2 additions & 0 deletions basyx.aasrepository/basyx.aasrepository.component/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM eclipse-temurin:17 as builder
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG FINAL_NAME=${project.build.finalName}
COPY maven/${FINAL_NAME}.jar ./
RUN java -Djarmode=layertools -jar ${FINAL_NAME}.jar extract

FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN mkdir /workspace
WORKDIR /workspace
COPY --from=builder dependencies/ ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM eclipse-temurin:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
USER nobody
WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
Expand Down
3 changes: 2 additions & 1 deletion ci/keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM quay.io/keycloak/keycloak:22.0.0

ARG HTTP_PROXY
ARG HTTPS_PROXY
# Make the realm configuration available for import
COPY /realm/BaSyx-realm.json /opt/keycloak_import/

Expand Down
4 changes: 4 additions & 0 deletions ci/keycloak/Dockerfile.keycloak
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# syntax=docker/dockerfile:1
FROM maven:3-eclipse-temurin-17-alpine as build
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /workspace
COPY ./initializer/pom.xml /workspace/pom.xml
COPY ./initializer/src /workspace/src
COPY ./realm/BaSyx-realm.json /workspace/BaSyx-realm.json
RUN mvn install

FROM keycloak/keycloak:24.0.4
ARG HTTP_PROXY
ARG HTTPS_PROXY
COPY --from=build /workspace/target/org.eclipse.digitaltwin.basyx.v3.clients-keycloak-issuer-initializer.jar /opt/keycloak/providers/issuer-initializer.jar
COPY --from=build /workspace/BaSyx-realm.json /opt/keycloak/data/import/BaSyx-realm.json

Expand Down
4 changes: 4 additions & 0 deletions examples/BaSyxClient/basyx-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM maven:3.8.1-openjdk-17 AS build
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /app
COPY pom.xml .
COPY src src
RUN mvn clean package -DskipTests

FROM openjdk:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /app
COPY --from=build /app/target/*-jar-with-dependencies.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
3 changes: 2 additions & 1 deletion examples/BaSyxClient/legacy-erp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.10-slim

ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /app

COPY . /app
Expand Down
3 changes: 2 additions & 1 deletion examples/BaSyxDatabridge/mqtt-publisher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.8-slim

ARG HTTP_PROXY
ARG HTTPS_PROXY
RUN pip install paho-mqtt

COPY publisher.py /publisher.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Stage 1: Build Stage
FROM maven:3.8.1-openjdk-17 AS build
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /app
# Kopiere die pom.xml und lade die Abhängigkeiten herunter
COPY pom.xml .
Expand All @@ -11,6 +13,8 @@ RUN mvn clean package -DskipTests

# Stage 2: Runtime Stage
FROM openjdk:17
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
Expand Down
2 changes: 2 additions & 0 deletions examples/BaSyxSecured/keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# syntax=docker/dockerfile:1
FROM maven:3-eclipse-temurin-17 AS build
ARG HTTP_PROXY
ARG HTTPS_PROXY
WORKDIR /workspace
COPY ./initializer/pom.xml /workspace/pom.xml
COPY ./initializer/src /workspace/src
Expand Down
Loading