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 21-bullseye #65

Closed
wants to merge 1 commit into from
Closed
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 @@ -10,7 +10,7 @@
unzip obs-v${FIRMWARE_VERSION}-initial-flash.zip && \
rm obs-v${FIRMWARE_VERSION}-initial-flash.zip

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

Check warning on line 13 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 && \
mv /tmp/obs/manifest.json /tmp/obs/manifest-${FIRMWARE_VERSION}.json
Expand All @@ -28,12 +28,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:21-bullseye AS nodebuilder

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

RUN export DEBIAN_FRONTEND=noninteractive && \

Check warning on line 36 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 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

[MEDIUM] NPM Install Command Without Pinned Version

Check if packages installed by npm are pinning a specific version.

Check warning on line 36 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.
apt-get update -qq && \
apt-get install -y -qq jq && \
npm install -g [email protected]
Expand All @@ -50,12 +50,12 @@
chmod -R a=rX /tmp/esp-web-tool/dist


FROM httpd:2.4-alpine

Check warning on line 53 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 53 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 59 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 60 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