Skip to content

Commit

Permalink
feat(bpdm-system-test): updated docker file.
Browse files Browse the repository at this point in the history
  • Loading branch information
SujitMBRDI committed Nov 6, 2024
1 parent ee85800 commit 7367561
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bpdm-system-tester/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
</dependencies>

<build>
<!-- Name jar without version to make it easier to reference it during CICD -->
<finalName>bpdm-system-tester</finalName>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<plugins>
<plugin>
Expand Down
28 changes: 28 additions & 0 deletions docker/system-tester/DOCKER_NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Notice for Docker image

DockerHub: [https://hub.docker.com/r/tractusx/bpdm-system-tester](https://hub.docker.com/r/tractusx/bpdm-system-tester)

Eclipse Tractus-X product(s) installed within the image:

**BPDM SYSTEM TESTER**

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/bpdm
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- System-Tester Dockerfile: https://github.com/eclipse-tractusx/bpdm/blob/main/docker/system-tester/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/bpdm/blob/main/LICENSE)


**Used base image**

- [eclipse-temurin:17-jre-alpine](https://github.com/adoptium/containers)
- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin
- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin
- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin


As with all Docker images, these likely also contain other software which may be under other licenses
(such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
37 changes: 37 additions & 0 deletions docker/system-tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
################################################################################
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
################################################################################

FROM maven:3.9-eclipse-temurin-21 AS build
ENV HOME=/home/app
COPY . $HOME
WORKDIR $HOME
RUN --mount=type=cache,target=/root/.m2 mvn -B -U clean package -pl bpdm-system-tester -am -DskipTests

FROM eclipse-temurin:21-jre-alpine
ENV HOME=/home/app
COPY --from=build $HOME/bpdm-system-tester/target/bpdm-system-tester.jar /usr/local/lib/bpdm/app.jar
ARG USERNAME=bpdm
ARG USERID=10001
ARG GID=10001
RUN addgroup -g $GID -S $USERNAME
RUN adduser -u $USERID -S $USERNAME $USERNAME
USER $USERNAME
WORKDIR /usr/local/lib/bpdm
EXPOSE 8080
ENTRYPOINT ["java","-jar","app.jar"]

0 comments on commit 7367561

Please sign in to comment.