-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ⬆️ Upgrade deps * 💚 Remove tcr * 💚 Update dockerfile * ✨ Update helm chart * ✨ Add web dockerfile * ✨ Add trivy dockerfile * ✨ Add web deployment * ✨ Update config * 🐛 Fix lint error
- Loading branch information
Showing
39 changed files
with
2,452 additions
and
1,853 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
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
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 |
---|---|---|
|
@@ -48,5 +48,10 @@ jobs: | |
- name: Lint Dockerfile | ||
uses: hadolint/[email protected] | ||
with: | ||
dockerfile: ./build/Dockerfile | ||
dockerfile: ./build/all.alpine.Dockerfile | ||
ignore: DL3018,DL3003,SC2155 | ||
- name: Lint Dockerfile | ||
uses: hadolint/[email protected] | ||
with: | ||
dockerfile: ./build/all.debian.Dockerfile | ||
ignore: DL3018,DL3003,SC2155,DL4006,SC2046,DL3008 |
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG ALPINE_VERSION=3.19 | ||
|
||
FROM alpine:${ALPINE_VERSION} AS trivy | ||
|
||
ARG USE_MIRROR=false | ||
ARG WITH_TRIVY_DB=false | ||
ARG TRIVY_VERSION=0.55.1 | ||
ARG TARGETOS TARGETARCH | ||
|
||
RUN set -eux && \ | ||
if [ "$USE_MIRROR" = true ]; then sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories; fi && \ | ||
apk add --no-cache wget && \ | ||
case "${TARGETARCH}" in \ | ||
amd64) export TRIVYARCH='64bit' ;; \ | ||
arm64) export TRIVYARCH='ARM64' ;; \ | ||
esac; \ | ||
export TRIVYOS=$(echo "${TARGETOS}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}') && \ | ||
wget -q -O trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz https://github.com/aquasecurity/trivy/releases/download/v"${TRIVY_VERSION}"/trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ | ||
tar -xzf trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ | ||
mv trivy /usr/local/bin/trivy && \ | ||
rm trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ | ||
mkdir -p /opt/trivy/ && \ | ||
trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress && \ | ||
trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress | ||
|
||
FROM scratch | ||
|
||
COPY --from=trivy /usr/local/bin/trivy /usr/local/bin/trivy | ||
COPY --from=trivy /opt/trivy/ /opt/trivy/ |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ARG NODE_VERSION=20-alpine3.19 | ||
ARG NGINX_VERSION=1.27.1-alpine | ||
|
||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS web-builder | ||
|
||
ARG USE_MIRROR=false | ||
|
||
RUN set -eux && \ | ||
if [ "$USE_MIRROR" = true ]; then sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories; fi && \ | ||
apk add --no-cache make bash ncurses build-base | ||
|
||
COPY ./web /web | ||
|
||
WORKDIR /web | ||
|
||
RUN --mount=type=cache,target=/web/node_modules set -eux && corepack enable && yarn install --immutable && yarn build | ||
|
||
FROM nginx:1.27.1-alpine | ||
|
||
COPY --from=web-builder /web/dist /usr/share/nginx/html |
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
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
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
Oops, something went wrong.