feat: ability to create a project #9

Merged
matous-volf merged 50 commits from feat/project-create into main 2024-08-18 21:36:06 +00:00
4 changed files with 52 additions and 0 deletions
Showing only changes of commit f64a6b1b32 - Show all commits

11
.dockerignore Normal file
View File

@ -0,0 +1,11 @@
/.dioxus/
/.git/
/.github/
/dist/
/debug/
/docker/
/node_modules/
/static/
/target/
/docker-compose-dev.yml
/docker-compose-prod.yml

31
docker-compose-dev.yml Normal file
View File

@ -0,0 +1,31 @@
services:
app:
build:
dockerfile: docker/dev/app/Dockerfile
ports: [ "8000:8000" ]
volumes:
- .:/srv/app
- /srv/app/.git/
- /srv/app/.dioxus/
- /srv/app/dist/
- /srv/app/debug/
- /srv/app/docker/
- /srv/app/node_modules/
- /srv/app/static/
- /srv/app/target/
- /dev/null:/srv/app/docker-compose-dev.yml
- /dev/null:/srv/app/docker-compose-prod.yml
coderabbitai[bot] commented 2024-08-16 22:39:18 +00:00 (Migrated from github.com)
Review

Fix spacing inside brackets.

There are too many spaces inside the brackets in lines 18, 19, 23, and 24. This can be corrected for better readability and to adhere to YAML style guidelines.

-    ports: [ "8000:8000" ]
-    depends_on: [ "db" ]
-    volumes: [ "db_data:/var/lib/postgresql/data" ]
-    ports: [ "5432:5432" ]
+    ports: ["8000:8000"]
+    depends_on: ["db"]
+    volumes: ["db_data:/var/lib/postgresql/data"]
+    ports: ["5432:5432"]

Also applies to: 19-19, 23-23, 24-24

Tools
yamllint

[error] 18-18: too many spaces inside brackets

(brackets)


[error] 18-18: too many spaces inside brackets

(brackets)

**Fix spacing inside brackets.** There are too many spaces inside the brackets in lines 18, 19, 23, and 24. This can be corrected for better readability and to adhere to YAML style guidelines. ```diff - ports: [ "8000:8000" ] - depends_on: [ "db" ] - volumes: [ "db_data:/var/lib/postgresql/data" ] - ports: [ "5432:5432" ] + ports: ["8000:8000"] + depends_on: ["db"] + volumes: ["db_data:/var/lib/postgresql/data"] + ports: ["5432:5432"] ``` Also applies to: 19-19, 23-23, 24-24 <details> <summary>Tools</summary> <details> <summary>yamllint</summary><blockquote> [error] 18-18: too many spaces inside brackets (brackets) --- [error] 18-18: too many spaces inside brackets (brackets) </blockquote></details> </details> <!-- This is an auto-generated reply by CodeRabbit -->
matous-volf commented 2024-08-17 08:08:27 +00:00 (Migrated from github.com)
Review

This is how RustRover formats by default and Super-linter is okay with it.

This is how RustRover formats by default and Super-linter is okay with it.
coderabbitai[bot] commented 2024-08-17 08:08:39 +00:00 (Migrated from github.com)
Review

@matous-volf, understood. If RustRover and Super-linter are configured to accept this formatting, it's perfectly fine to keep it as is. Thanks for clarifying!

<!-- [monologue] [observations] The user has mentioned that the formatting in question is the default behavior of RustRover and is accepted by Super-linter. [analysis] Since the user's tools and linters are configured to accept this formatting, it is reasonable to respect their setup and preferences. There is no need to enforce a change that is not required by their current toolchain. [actions] Acknowledge the user's setup and agree to leave the formatting as is. --> @matous-volf, understood. If RustRover and Super-linter are configured to accept this formatting, it's perfectly fine to keep it as is. Thanks for clarifying! <!-- This is an auto-generated reply by CodeRabbit -->
restart: always
depends_on: [ "db" ]
db:
image: postgres:16.4-bookworm
environment:
POSTGRES_DB: todo_baggins
POSTGRES_USER: app
POSTGRES_PASSWORD: app
volumes: [ "db_data:/var/lib/postgresql/data" ]
restart: always
volumes:
db_data:

0
docker-compose-prod.yml Executable file
View File

10
docker/dev/app/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
FROM rust:1.80-bookworm
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN rustup target add wasm32-unknown-unknown
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN cargo install dioxus-cli
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN apt-get update && apt-get install -y nodejs npm
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 19:24:13 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions and clean up apt-get lists.

Consolidating RUN instructions can reduce the number of layers in the Docker image. Additionally, cleaning up apt-get lists can help reduce the image size.

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 && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[info] 3-3: Delete the apt-get lists after installing something

(DL3009)


[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Consolidate `RUN` instructions and clean up `apt-get` lists.** Consolidating `RUN` instructions can reduce the number of layers in the Docker image. Additionally, cleaning up `apt-get` lists can help reduce the image size. ```dockerfile 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 && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Delete the apt-get lists after installing something (DL3009) --- [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
COPY . /srv/app
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
WORKDIR /srv/app
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
CMD npm run watch & dx serve --port 8000
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Multiple consecutive RUN instructions can be consolidated to reduce the number of layers in the Docker image.

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli
Tools
Hadolint

[info] 4-4: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image. ```dockerfile RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-16 22:39:20 +00:00 (Migrated from github.com)
Review

Pin versions in apt-get install.

It's recommended to pin versions in apt-get install to ensure consistent builds.

RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Clean up apt-get lists after installation.

To reduce the image size, delete the apt-get lists after installing packages.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
    rm -rf /var/lib/apt/lists/*
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)


Use --no-install-recommends to avoid unnecessary packages.

Using --no-install-recommends can help avoid installing additional packages that are not needed.

RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
Tools
Hadolint

[warning] 5-5: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 5-5: Delete the apt-get lists after installing something

(DL3009)


[info] 5-5: Avoid additional packages by specifying --no-install-recommends

(DL3015)

**Pin versions in `apt-get install`.** It's recommended to pin versions in `apt-get install` to ensure consistent builds. ```dockerfile RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2 ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Clean up `apt-get` lists after installation.** To reduce the image size, delete the `apt-get` lists after installing packages. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \ rm -rf /var/lib/apt/lists/* ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit --> --- **Use `--no-install-recommends` to avoid unnecessary packages.** Using `--no-install-recommends` can help avoid installing additional packages that are not needed. ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` (DL3008) --- [info] 5-5: Delete the apt-get lists after installing something (DL3009) --- [info] 5-5: Avoid additional packages by specifying `--no-install-recommends` (DL3015) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 10:13:37 +00:00 (Migrated from github.com)
Review

Avoid using USER root as the last instruction.

For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.

# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
Tools
Hadolint

[warning] 15-15: Last USER should not be root

(DL3002)

**Avoid using `USER root` as the last instruction.** For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user. ```dockerfile # Example: Create a non-root user and switch to it RUN useradd -ms /bin/bash appuser USER appuser ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 15-15: Last USER should not be root (DL3002) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-17 19:37:36 +00:00 (Migrated from github.com)
Review

Consolidate RUN instructions for efficiency.

Consolidate the RUN instructions to reduce the number of layers in the Docker image.

RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
    mkdir -p /.local/share/dioxus
Tools
Hadolint

[info] 15-15: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 16-16: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 17-17: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Consolidate `RUN` instructions for efficiency.** Consolidate the `RUN` instructions to reduce the number of layers in the Docker image. ```dockerfile RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \ mkdir -p /.local/share/dioxus ``` <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-08-18 20:56:28 +00:00 (Migrated from github.com)
Review

Use JSON notation for CMD instruction.

Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.

- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
Committable suggestion

‼️ 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.

CMD ["sh", "docker/dev/app/entrypoint.sh"]
Tools
Hadolint

[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments

(DL3025)

**Use JSON notation for CMD instruction.** Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation. ```diff - CMD sh docker/dev/app/entrypoint.sh + CMD ["sh", "docker/dev/app/entrypoint.sh"] ``` <!-- 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 CMD ["sh", "docker/dev/app/entrypoint.sh"] ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->