feat: deployment #46
@ -1,4 +1,4 @@
|
||||
|
||||
FROM rust:1.80-bookworm as builder
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
FROM rust:1.80-bookworm AS builder
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
RUN rustup target add wasm32-unknown-unknown && \
|
||||
cargo install dioxus-cli diesel_cli && \
|
||||
@ -16,7 +16,14 @@ FROM debian:bookworm-slim AS runner
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
RUN apt-get update && apt-get install -y libpq5
|
||||
|
||||
COPY --from=builder /srv/app/dist /srv/app/dist
|
||||
COPY ./.env /srv/app/.env
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
COPY .env /srv/app/.env
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
RUN chown -R 1000:1000 /srv/app
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
WORKDIR /srv/app
|
||||
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
HEALTHCHECK CMD curl --fail http://localhost:8000 || exit 1
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
USER 1000:1000
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
CMD ["./dist/todo-baggins"]
|
||||
![]() Optimize the runner stage by avoiding additional packages and deleting apt-get lists. Consider the following improvements to the runner stage:
These optimizations will help reduce the image size and improve the security of the image by removing unnecessary files. Committable suggestion
ToolsHadolint
**Optimize the runner stage by avoiding additional packages and deleting apt-get lists.**
Consider the following improvements to the runner stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN apt-get update && apt-get install -y libpq5=15.8-0+deb12u1
+RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1
```
2. Add `&& rm -rf /var/lib/apt/lists/*` to the `apt-get install` command to delete the apt-get lists after installing packages:
```diff
-RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1
+RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1 && rm -rf /var/lib/apt/lists/*
```
These optimizations will help reduce the image size and improve the security of the image by removing unnecessary files.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM debian:bookworm-slim AS runner
RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /srv/app/dist /srv/app/dist
COPY .env /srv/app/.env
RUN chown -R 1000:1000 /srv/app
WORKDIR /srv/app
HEALTHCHECK CMD curl --fail http://localhost:8000 || exit 1
USER 1000:1000
CMD ["./dist/todo-baggins"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 16-16: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 16-16: Delete the apt-get lists after installing something
(DL3009)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Optimize the builder stage by avoiding additional packages and consolidating Consider the following improvements to the builder stage:
These optimizations will help reduce the image size and improve the build performance. Committable suggestion
ToolsHadolint
**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.**
Consider the following improvements to the builder stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN rustup target add wasm32-unknown-unknown && \
- cargo install dioxus-cli diesel_cli && \
- apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+ cargo install dioxus-cli diesel_cli && \
+ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
```
2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency:
```diff
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+ npm run build && \
+ dx build --release
```
These optimizations will help reduce the image size and improve the build performance.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
FROM rust:1.80-bookworm AS builder
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli && \
apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
COPY . /srv/app
WORKDIR /srv/app
RUN npm install && \
npm run build && \
dx build --release
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
Optimize the builder stage by avoiding additional packages and consolidating
RUN
instructions.Consider the following improvements to the builder stage:
--no-install-recommends
to theapt-get install
command to avoid installing unnecessary packages:RUN
instructions fornpm install
,npm run build
, anddx build --release
into a singleRUN
instruction to reduce the number of layers and improve build efficiency:These optimizations will help reduce the image size and improve the build performance.
Committable suggestion
Tools
Hadolint
Optimize the builder stage by avoiding additional packages and consolidating
RUN
instructions.Consider the following improvements to the builder stage:
--no-install-recommends
to theapt-get install
command to avoid installing unnecessary packages:RUN
instructions fornpm install
,npm run build
, anddx build --release
into a singleRUN
instruction to reduce the number of layers and improve build efficiency:These optimizations will help reduce the image size and improve the build performance.
Committable suggestion
Tools
Hadolint