Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump node from 20-bullseye to 23-bullseye #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@



COPY --chown=100 ./public-html/ ./

Check warning on line 20 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[LOW] Chown Flag Exists

It is considered a best practice for every executable in a container to be owned by the root user even if it is executed by a non-root user, only execution permissions are required on the file, not ownership
RUN sed -i "s/FIRMWARE_VERSION/${FIRMWARE_VERSION}/g" /tmp/obs/index.html && \
sed -i "s/FIRMWARE_VERSION/${FIRMWARE_VERSION}/g" /tmp/obs/manifest.json && \
cp /tmp/obs/manifest.json /tmp/obs/manifest-obs-${FIRMWARE_VERSION}.json && \
Expand All @@ -39,12 +39,12 @@
RUN chmod -R a=rX .

# based on infos here https://github.com/espressif/esptool-js/blob/main/.github/workflows/ci.yml#L16
FROM node:20-bullseye AS nodebuilder
FROM node:23-bullseye AS nodebuilder

# see at https://github.com/esphome/esp-web-tools/releases
ARG ESP_WEB_TOOLS_VERSION=10.1.0

RUN export DEBIAN_FRONTEND=noninteractive && \

Check warning on line 47 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[MEDIUM] Apt Get Install Pin Version Not Defined

When installing a package, its pin version should be defined

Check warning on line 47 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[INFO] APT-GET Not Avoiding Additional Packages

Check if any apt-get installs don't use '--no-install-recommends' flag to avoid installing additional packages.

Check warning on line 47 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[INFO] Apt Get Install Lists Were Not Deleted

After using apt-get install, it is needed to delete apt-get lists
apt-get update -qq && \
apt-get install -y -qq jq && \
npm install -g [email protected]
Expand All @@ -61,12 +61,12 @@
chmod -R a=rX /tmp/esp-web-tool/dist


FROM httpd:2.4-alpine

Check warning on line 64 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[HIGH] Missing User Instruction

A user should be specified in the dockerfile, otherwise the image will run as root

Check warning on line 64 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[LOW] Healthcheck Instruction Missing

Ensure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working

LABEL version="${FIRMWARE_VERSION}" \
description="OpenBikeSensor Firmware with ESP Web Tools" \
maintainer="[email protected]"

COPY --chown=nobody:nogroup --from=builder /tmp/obs/ /usr/local/apache2/htdocs/

Check warning on line 70 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[LOW] Chown Flag Exists

It is considered a best practice for every executable in a container to be owned by the root user even if it is executed by a non-root user, only execution permissions are required on the file, not ownership
COPY --chown=nobody:nogroup --from=nodebuilder /tmp/esp-web-tool/dist/web/ /usr/local/apache2/htdocs/esp-web-tools

Check warning on line 71 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[LOW] Chown Flag Exists

It is considered a best practice for every executable in a container to be owned by the root user even if it is executed by a non-root user, only execution permissions are required on the file, not ownership

Loading