Skip to content

Conversation

@neverping
Copy link
Contributor

Most fixes are related to executing the run-lgtm.sh script, but I also changed
the build scripts and Docker file.

The "container" directory and additional directories required by Grafana, Loki,
and Prometheus were not present. The "container" directory is now part of the
".gitignore" file, meaning that if a newcomer downloads this repository and
attempts to run the "run-lgtm.sh" script, it won't work. We will create these
directories if they don't exist.

The second issue comes with the container runtime.

I am a Fedora Workstation user, and because of that, it contains some
interesting paradigms when running containers.

By default, Fedora uses Podman as its container runtime. I didn't switch to
Docker for personal reasons.

I added some changes related to the Dockerfile to include the image's full
address, defaulting to docker.io. I could have used Red Hat's mirror
suggested by Podman (registry.access.redhat.com). However, Red Hat has a
rate limit on its own registry. Red Hat also publishes its UBI images to
Docker Hub. Docker Hub is the most well-known Docker Registry, and some
people pay for a Docker license, so they don't get rate-limited. It's a
reasonable choice to use Docker Hub. This prevents Podman from prompting the
user to select a registry when building the image.

Finally, to address a minor issue with Bind Mounts. I added the "z" flag as
a mount option, which allows users with SELinux enabled to allow container
images to manipulate files on the host machine. SELinux comes enabled by
default on Fedora Workstation. Otherwise, the bind mount works but prevents
the running container from writing data, resulting in "access denied". The
"z" flag won´t be an issue on non-Red Hat systems. I tested this flag on
Debian 11 with KVM.

@CLAassistant
Copy link

CLAassistant commented Oct 28, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant

This comment has been minimized.

Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@neverping neverping force-pushed the main branch 3 times, most recently from b96cb49 to 45d9ea2 Compare October 31, 2025 13:12
Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should apply the same improvements for our Windows users too 😃

@neverping
Copy link
Contributor Author

Note: I prefer command + subcommand + operation on Docker commands such as docker container run and docker image pull rather than docker run and docker pull because when I was learning Docker in 2018, the subcommand categories were introduced, and to me, it's readable for newcomers.

@zeitlinger
Copy link
Member

please run the linter: https://github.com/grafana/docker-otel-lgtm/blob/main/CONTRIBUTING.md#linting

@neverping neverping force-pushed the main branch 2 times, most recently from 900be6b to 123c7ec Compare November 3, 2025 10:15
@neverping neverping force-pushed the main branch 2 times, most recently from 7d3f502 to 1963e58 Compare November 3, 2025 10:50
@neverping
Copy link
Contributor Author

neverping commented Nov 3, 2025

please run the linter: https://github.com/grafana/docker-otel-lgtm/blob/main/CONTRIBUTING.md#linting

Yeah, I wasn't aware of it, so I ran it locally and fixed the issues I found. Let's see what it looks like on GitHub Actions.

@neverping
Copy link
Contributor Author

Oops... rebased now.

@martincostello
Copy link
Member

Looks OK to me - will clone locally and run the PowerShell scripts to check it's working.

Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes after testing locally.

  1. Update cmd file to pass boolean to PowerShell correctly.
  2. Fix incorrect else in .ps1.
  3. Always use the $ReleaseTag variable.

@neverping neverping force-pushed the main branch 2 times, most recently from 39bd08d to c8b2a3c Compare November 3, 2025 12:46
Most fixes are related to executing the run-lgtm.sh script, but I also changed
the build scripts and Docker file.

The "container" directory and additional directories required by Grafana, Loki,
and Prometheus were not present. The "container" directory is now part of the
".gitignore" file, meaning that if a newcomer downloads this repository and
attempts to run the "run-lgtm.sh" script, it won't work. We will create these
directories if they don't exist.

The second issue comes with the container runtime.

I am a Fedora Workstation user, and because of that, it contains some
interesting paradigms when running containers.

By default, Fedora uses Podman as its container runtime. I didn't switch to
Docker for personal reasons.

I added some changes related to the Dockerfile to include the image's full
address, defaulting to docker.io. I could have used Red Hat's mirror
suggested by Podman (registry.access.redhat.com). However, Red Hat has a
rate limit on its own registry. Red Hat also publishes its UBI images to
Docker Hub. Docker Hub is the most well-known Docker Registry, and some
people pay for a Docker license, so they don't get rate-limited. It's a
reasonable choice to use Docker Hub. This prevents Podman from prompting the
user to select a registry when building the image.

Finally, to address a minor issue with Bind Mounts. I added the "z" flag as
a mount option, which allows users with SELinux enabled to allow container
images to manipulate files on the host machine. SELinux comes enabled by
default on Fedora Workstation. Otherwise, the bind mount works but prevents
the running container from writing data, resulting in "access denied". The
"z" flag won´t be an issue on non-Red Hat systems. I tested this flag on
Debian 11 with KVM.
Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one tiny change to fix lint warning, otherwise LGTM.

Co-authored-by: Martin Costello <[email protected]>
Signed-off-by: Willian Braga da Silva <[email protected]>
@martincostello martincostello merged commit 8fff718 into grafana:main Nov 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants