Skip to content

Commit 628de81

Browse files
authored
Merge pull request #600 from boozallen/598-update-fastapi-to-use-redhat-ubi
#598 update Fastapi base image to use RHAT UBI image for better adapt CVE issue
2 parents a22d2f1 + 68cdea3 commit 628de81

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

DRAFT_RELEASE_NOTES.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Major Additions
22

3+
## DEPRECATION
4+
The following artifacts are deprecated as of 1.12.0 and will be removed in 1.13.0. If you believe you had a good use case for any of these artifacts, please reach out to the aiSSEMBLE team.
5+
- `aissemble-fastapi` Docker image
6+
- `aissemble-fastapi-chart` Helm chart
7+
38
# Breaking Changes
49
_Note: instructions for adapting to these changes are outlined in the upgrade instructions below._
510

@@ -87,6 +92,10 @@ To start your aiSSEMBLE upgrade, update your project's pom.xml to use the 1.11.0
8792
The hive service base image has been switched from `docker.io/eclipse-temurin:17-jre` to `registry.access.redhat.com/ubi9/openjdk-17-runtime:1.21`.
8893
Projects should update their Hive service Dockerfile or any related startup configuration script to use `microdnf` instead `apt-get` as the package manager if applicable
8994

95+
### For projects that uses aissemble-fastapi
96+
The fastapi base image has been switched from `docker.io/python:3.11` to `registry.access.redhat.com/ubi9/python-311:9.5`.
97+
There may be adjustments needed if applicable.
98+
9099
## Final Steps - Required for All Projects
91100
### Finalizing the Upgrade
92101
1. Run `./mvnw org.technologybrewery.baton:baton-maven-plugin:baton-migrate` to apply the automatic migrations

extensions/extensions-docker/aissemble-fastapi/pom.xml

+47
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,52 @@
2222
</plugin>
2323
</plugins>
2424
</build>
25+
<profiles>
26+
<profile>
27+
<id>integration-test</id>
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<groupId>${group.fabric8.plugin}</groupId>
32+
<artifactId>docker-maven-plugin</artifactId>
33+
<executions>
34+
<execution>
35+
<id>test-image</id>
36+
<phase>integration-test</phase>
37+
<configuration>
38+
<images>
39+
<image>
40+
<run>
41+
<wait>
42+
<http>
43+
<url>http://localhost:8080</url>
44+
<method>GET</method>
45+
<status>200</status>
46+
</http>
47+
</wait>
48+
<ports>
49+
<port>8080:80</port>
50+
</ports>
51+
</run>
52+
</image>
53+
</images>
54+
</configuration>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.codehaus.mojo</groupId>
60+
<artifactId>exec-maven-plugin</artifactId>
61+
<executions>
62+
<execution>
63+
<id>test-image-cleanup</id>
64+
<phase>post-integration-test</phase>
65+
</execution>
66+
</executions>
67+
</plugin>
68+
</plugins>
69+
</build>
70+
</profile>
71+
</profiles>
2572

2673
</project>

extensions/extensions-docker/aissemble-fastapi/src/main/resources/docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Script for creating base FastAPI Docker image
22

3-
FROM docker.io/python:3.11
3+
FROM registry.access.redhat.com/ubi9/python-311:9.5
44

55
LABEL org.opencontainers.image.source="https://github.com/boozallen/aissemble"
66

@@ -12,7 +12,7 @@ RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
1212

1313
# Custom start script to run fastAPI with specific
1414
# module (defined using MODULE environment variable)
15-
COPY ./src/main/resources/docker/scripts/start.sh /start.sh
15+
COPY --chown=default:root ./src/main/resources/docker/scripts/start.sh /start.sh
1616
RUN chmod +x /start.sh
1717

1818
# Add FastAPI module

0 commit comments

Comments
 (0)