Skip to content

Commit

Permalink
Add proxy build argument to dockerfiles (#533)
Browse files Browse the repository at this point in the history
* Add proxy build argument to dockerfiles

* Fix missing newline
  • Loading branch information
seicke authored Dec 7, 2024
1 parent f51da9e commit ac705f5
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 3 deletions.
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

Check warning on line 1 in basyx.aasregistry/basyx.aasregistry-service-release-kafka-mem/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (aas-registry-kafka-mem, basyx.aasregistry/basyx.aasregistry-service-re...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.aasregistry/basyx.aasregistry-service-release-kafka-mongodb/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (aas-registry-kafka-mongodb, basyx.aasregistry/basyx.aasregistry-servic...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.aasregistry/basyx.aasregistry-service-release-log-mem/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (aas-registry-log-mem, basyx.aasregistry/basyx.aasregistry-service-rele...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.aasregistry/basyx.aasregistry-service-release-log-mongodb/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (aas-registry-log-mongodb, basyx.aasregistry/basyx.aasregistry-service-...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.submodelregistry/basyx.submodelregistry-service-release-kafka-mem/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (submodel-registry-kafka-mem, basyx.submodelregistry/basyx.submodelregi...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.submodelregistry/basyx.submodelregistry-service-release-kafka-mongodb/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (submodel-registry-kafka-mongodb, basyx.submodelregistry/basyx.submodel...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (submodel-registry-log-mem, basyx.submodelregistry/basyx.submodelregist...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

Check warning on line 1 in basyx.submodelregistry/basyx.submodelregistry-service-release-log-mongodb/src/main/docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-prerelease (submodel-registry-log-mongodb, basyx.submodelregistry/basyx.submodelre...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
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

0 comments on commit ac705f5

Please sign in to comment.