-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f7f0c3
commit 7c9d12e
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,25 +6,33 @@ WORKDIR /build | |
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y unzip | ||
apt-get install -y unzip && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install PlantUML | ||
RUN wget https://downloads.sourceforge.net/project/plantuml/plantuml.jar -O /usr/local/bin/plantuml.jar && \ | ||
echo '#!/bin/bash\njava -jar /usr/local/bin/plantuml.jar "$@"' > /usr/local/bin/plantuml && \ | ||
chmod +x /usr/local/bin/plantuml | ||
|
||
|
||
# Copy and setup Structurizr CLI | ||
COPY structurizr-cli-*.zip /build/ | ||
RUN mkdir /build/structurizr-cli && \ | ||
unzip structurizr-cli-*.zip -d /build/structurizr-cli && \ | ||
chmod +x /build/structurizr-cli/structurizr.sh && \ | ||
rm structurizr-cli-*.zip | ||
|
||
# Final image | ||
### Final image ### | ||
FROM eclipse-temurin:17.0.8.1_1-jre-jammy | ||
|
||
# Create a non-root user | ||
# Install dependencies and clean up | ||
RUN apt-get update && \ | ||
apt-get install -y graphviz jq git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | ||
|
||
|
||
### Create a non-root user ### | ||
RUN useradd -m structurizr | ||
USER structurizr | ||
|
||
|
@@ -37,15 +45,9 @@ COPY --from=builder /usr/local/bin/plantuml /usr/local/bin/ | |
WORKDIR /usr/local/structurizr-cli | ||
ENV PATH /usr/local/structurizr-cli/:/usr/local/bin/:$PATH | ||
|
||
# Install dependencies and clean up | ||
RUN apt-get update && \ | ||
apt-get install -y graphviz jq git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | ||
|
||
# Setup Git configuration | ||
RUN git config --global user.name github-actions && \ | ||
git config --global user.email [email protected] | ||
|
||
# Set the entry point | ||
ENTRYPOINT ["./structurizr.sh"] | ||
ENTRYPOINT ["./structurizr.sh"] |