Skip to content

Support for alpine linux#46

Open
gvatsal60 wants to merge 12 commits into
masterfrom
support-for-alpine-linux
Open

Support for alpine linux#46
gvatsal60 wants to merge 12 commits into
masterfrom
support-for-alpine-linux

Conversation

@gvatsal60
Copy link
Copy Markdown
Owner

@gvatsal60 gvatsal60 commented Jun 21, 2025

This pull request introduces a new Alpine-based Docker build and supporting utility script, and makes several improvements to the existing Debian/Ubuntu setup and documentation. The main focus is on adding Dockerfile.alpine and alpine-util.sh for Alpine-based environments, updating shell configuration consistency, and improving the Docker Compose setup.

New Alpine-based Docker support:

  • Added Dockerfile.alpine for building an Alpine-based Docker image, including detailed documentation, dependency installation, user management, and helper script integration.
  • Added scripts/alpine-util.sh, a comprehensive shell script for Alpine system setup, user/group management, sudo and Docker group configuration, shell customization, and WSL integration.

Docker Compose and build configuration:

  • Updated docker-compose.yml to add an alpine-wsl service (using the new Alpine Dockerfile) and commented out the previous Ubuntu-based service.

Shell and user experience improvements:

  • Improved shell prompt and alias setup in both Alpine and Debian/Ubuntu utility scripts for consistency, including using ${HOME} in paths and updating aliases for better portability. [1] [2]

Documentation updates:

  • Updated README.md to clarify Docker build instructions, recommending docker-compose build for building images.
  • Minor improvements to the Ubuntu Dockerfile comments for clarity.

Copilot AI review requested due to automatic review settings June 21, 2025 08:03
@gvatsal60 gvatsal60 linked an issue Jun 21, 2025 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for an Alpine-based WSL service by introducing a new Alpine utility script and Dockerfile, updating docker-compose and documentation accordingly.

  • Introduce alpine-wsl service in docker-compose.yml and comment out the Ubuntu service
  • Update README to use docker-compose build instead of docker-compose up --build
  • Provide new alpine-util.sh script and Dockerfile.alpine for Alpine environments

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docker-compose.yml Commented out Ubuntu service and added alpine-wsl config
README.md Changed example command to docker-compose build
Dockerfiles/scripts/debian-util.sh Updated PATH checks to use ${HOME} for consistency
Dockerfiles/scripts/alpine-util.sh Added new utility script for Alpine-based environments
Dockerfiles/Dockerfile.ubuntu Removed unminimize step from RUN comment
Dockerfiles/Dockerfile.alpine Added new Dockerfile for building an Alpine-based image
Comments suppressed due to low confidence (3)

docker-compose.yml:20

  • [nitpick] Consider removing the commented-out Ubuntu service block to reduce clutter and keep the compose file focused on active configurations.
  # ubuntu-wsl:

README.md:116

  • If you intend to both build and start the containers, either revert to docker-compose up --build or add a separate docker-compose up instruction after the build command.
   docker-compose build

Dockerfiles/scripts/alpine-util.sh:43

  • The script uses a Bash-style [[ ]] test but the shebang is /bin/dash. Dash doesn’t support [[ ]]; switch to POSIX [ or case, or use a bash shebang.
if [[ "${PATH}" != *"${HOME}/.local/bin"* ]]; then

Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
alias sou='. ${HOME}/.profile'

# Add 'update' as an alias in 'bash_history'
echo -e 'update' >> ${HOME}/.ash_history
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

BusyBox echo may not support the -e flag; use printf '%s ' 'update' >> ${HOME}/.ash_history for reliable behavior.

Suggested change
echo -e 'update' >> ${HOME}/.ash_history
printf '%s\n' 'update' >> ${HOME}/.ash_history

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
# Date: 17-Sep-2024
# Description:
# This script contains utility functions and common operations for managing
# a Alpine-based system. It includes functions for system maintenance,
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

Change “a Alpine-based” to “an Alpine-based” for correct English grammar.

Suggested change
# a Alpine-based system. It includes functions for system maintenance,
# an Alpine-based system. It includes functions for system maintenance,

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/Dockerfile.alpine Outdated
# 1. Execute the 'alpine-util.sh' script with USERNAME as an argument
# 2. Remove temporary files and directories
RUN ash "/tmp/${HELPER_SCRIPT_SRC}/${HELPER_SCRIPT}" "${USERNAME}" "${USER_UID}" "${USER_GID}" \
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

This cleanup path is specific to APT; since this is an Alpine image, remove or replace it with rm -rf /var/cache/apk/* if needed.

Suggested change
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
&& rm -rf /var/cache/apk/* "/tmp/${HELPER_SCRIPT_SRC}/"

Copilot uses AI. Check for mistakes.
&& apk del build-base

# ##########################################################################
# Copy Files
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

[nitpick] The # Copy Files section is empty—either remove the placeholder comments or add the intended copy instructions to avoid confusion.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 11, 2025 05:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
}

# Function: print_err
# Description: : Prints each argument on a new line to the standard error stream (stderr),
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

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

Remove extra colon after 'Description:'

Suggested change
# Description: : Prints each argument on a new line to the standard error stream (stderr),
# Description: Prints each argument on a new line to the standard error stream (stderr),

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +134 to +135
println 'export LC_ALL=en_GB.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_GB.UTF-8|' /etc/profile.d/locale.sh
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

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

Locale configuration inconsistency: script sets environment to en_US.UTF-8 (lines 30-31) but configures system to use en_GB.UTF-8. Should use consistent locale throughout.

Suggested change
println 'export LC_ALL=en_GB.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_GB.UTF-8|' /etc/profile.d/locale.sh
println 'export LC_ALL=en_US.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_US.UTF-8|' /etc/profile.d/locale.sh

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 23, 2026 02:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +120 to +123
# Ensure that login shells get the correct path if the user updated the PATH using ENV.
# rm -f /etc/profile.d/00-restore-env.sh
# echo "export PATH=${PATH//$(sh -lc "echo \$PATH")/\$PATH}" > /etc/profile.d/00-restore-env.sh
# chmod +x /etc/profile.d/00-restore-env.sh
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

These commented-out lines for PATH restoration appear to be copied from debian-util.sh. However, the commented code uses bash-specific parameter expansion ${PATH//...} which wouldn't work in dash/ash anyway. If this functionality is needed in the future, it should be uncommented and rewritten to be POSIX-compliant. If it's not needed, consider removing these comments to reduce clutter.

Suggested change
# Ensure that login shells get the correct path if the user updated the PATH using ENV.
# rm -f /etc/profile.d/00-restore-env.sh
# echo "export PATH=${PATH//$(sh -lc "echo \$PATH")/\$PATH}" > /etc/profile.d/00-restore-env.sh
# chmod +x /etc/profile.d/00-restore-env.sh
# Ensure that login shells get the correct PATH if the user updates it using ENV (no automatic restoration configured here).

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/Dockerfile.alpine Outdated
# 1. Execute the 'alpine-util.sh' script with USERNAME as an argument
# 2. Remove temporary files and directories
RUN ash "/tmp/${HELPER_SCRIPT_SRC}/${HELPER_SCRIPT}" "${USERNAME}" "${USER_UID}" "${USER_GID}" \
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The cleanup command references /var/lib/apt/lists/* which is a Debian/Ubuntu-specific APT cache directory. Alpine Linux uses apk package manager, not apt, so this directory doesn't exist and the cleanup is ineffective. Alpine's package cache should be cleaned with apk cache clean or by removing /var/cache/apk/*, though this is typically not needed as --no-cache flag was already used during package installation.

Suggested change
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
&& rm -rf "/tmp/${HELPER_SCRIPT_SRC}/"

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +134 to +135
println 'export LC_ALL=en_GB.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_GB.UTF-8|' /etc/profile.d/locale.sh
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The locale is set to en_GB.UTF-8 in lines 134-135, but the script header at lines 30-31 sets LANG and LC_ALL to en_US.UTF-8. This inconsistency could cause confusion. The script should use the same locale throughout, or clarify why different locales are used in different contexts.

Suggested change
println 'export LC_ALL=en_GB.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_GB.UTF-8|' /etc/profile.d/locale.sh
println 'export LC_ALL=en_US.UTF-8' >>/etc/profile.d/locale.sh
sed -i 's|LANG=C.UTF-8|LANG=en_US.UTF-8|' /etc/profile.d/locale.sh

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated

# Update rc-service
if type rc-update >/dev/null 2>&1; then
rc-update add docker
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The rc-update add docker command is missing the runlevel parameter. In Alpine's OpenRC, you typically need to specify which runlevel to add the service to, commonly default. The command should be rc-update add docker default to properly enable the Docker service at boot.

Suggested change
rc-update add docker
rc-update add docker default

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +151 to +153
addgroup -g "${USER_GID}" "${group_name}" || exit 1
deluser "${USERNAME}" "${group_name}" || exit 1
adduser "${USERNAME}" "${group_name}" || exit 1
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The logic for updating the user's GID appears incorrect. When the group GID needs to be updated, this code creates a new group with the desired GID, removes the user from the group, then re-adds them. However, addgroup -g creates a new group, not updates an existing one. If a group with that GID already exists, this will fail. Consider using groupmod if available in Alpine, or use a different approach like deleting and recreating the group with the new GID.

Suggested change
addgroup -g "${USER_GID}" "${group_name}" || exit 1
deluser "${USERNAME}" "${group_name}" || exit 1
adduser "${USERNAME}" "${group_name}" || exit 1
if command -v groupmod >/dev/null 2>&1; then
# Prefer using groupmod when available to update the group's GID in place
groupmod -g "${USER_GID}" "${group_name}" || exit 1
else
# Fallback for environments without groupmod:
# - If a group with the desired GID already exists, use that group.
# - Otherwise, create a new group with the desired GID and a unique name.
target_group="$(awk -F: -v gid="${USER_GID}" '$3 == gid {print $1; exit}' /etc/group)"
if [ -z "${target_group}" ]; then
target_group="${group_name}_gid${USER_GID}"
addgroup -g "${USER_GID}" "${target_group}" || exit 1
fi
# Move the user from the old group to the target group.
deluser "${USERNAME}" "${group_name}" || exit 1
adduser "${USERNAME}" "${target_group}" || exit 1
fi

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
# Description: : Prints each argument on a new line to the standard error stream (stderr),
# while suppressing any error messages from printf
print_err() {
printf "%s\n" "$*" 2>/dev/null >&2
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The print_err function in alpine-util.sh (line 107) redirects errors from printf but doesn't include the 2>/dev/null redirect before >&2 like the debian-util.sh version. While this works, it's inconsistent with the debian-util.sh implementation at line 104, which has printf "%s\n" "$*" >&2. For consistency, both should use the same implementation.

Suggested change
printf "%s\n" "$*" 2>/dev/null >&2
printf "%s\n" "$*" >&2

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +43 to +45
if [[ "${PATH}" != *"${HOME}/.local/bin"* ]]; then
export PATH="${PATH}:${HOME}/.local/bin";
fi
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The use of [[ ... ]] is a bash-specific construct (bashism) that is not supported in dash/ash. This rc_snippet content will be written to the user's .profile file and executed by ash (Alpine's default shell), which will cause a syntax error. Replace [[ ... ]] with POSIX-compliant [ ... ] and use a case statement for the pattern matching instead, or ensure the snippet is only evaluated in bash context.

Suggested change
if [[ "${PATH}" != *"${HOME}/.local/bin"* ]]; then
export PATH="${PATH}:${HOME}/.local/bin";
fi
case ":$PATH:" in
*":$HOME/.local/bin:"*) ;;
*) PATH="$PATH:$HOME/.local/bin"; export PATH ;;
esac

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
# Check if the user exists
if id "${USERNAME}" >/dev/null 2>&1; then
println "${rc_snippet}" >>"${user_rc_path}/.profile"
println 'export PROMPT_DIRTRIM=4' >>"${user_rc_path}/.profile"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

PROMPT_DIRTRIM is a bash-specific variable that controls how many trailing directory components to retain when expanding \w in PS1. However, Alpine uses ash as the default shell (not bash), and ash doesn't support PROMPT_DIRTRIM. This variable will have no effect in the Alpine environment unless the user explicitly switches to bash.

Suggested change
println 'export PROMPT_DIRTRIM=4' >>"${user_rc_path}/.profile"

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
}

# Function: print_err
# Description: : Prints each argument on a new line to the standard error stream (stderr),
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The description has a double colon: ": Prints each" should be "Prints each" (remove the leading colon).

Suggested change
# Description: : Prints each argument on a new line to the standard error stream (stderr),
# Description: Prints each argument on a new line to the standard error stream (stderr),

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
# Function: println
# Description: Prints each argument on a new line, suppressing any error messages.
println() {
command printf %s\\n "$*" 2>/dev/null
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The println function uses %s\\n (double backslash) which will produce a literal \n in the output instead of a newline. This should be %s\n (single backslash) to correctly print a newline character. Compare with debian-util.sh line 97 which correctly uses printf "%s\n".

Suggested change
command printf %s\\n "$*" 2>/dev/null
command printf "%s\n" "$*" 2>/dev/null

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 6, 2026 15:29
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 6, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment on lines 113 to 117
Build and run the Docker containers:

```sh
docker-compose up --build
docker-compose build
```
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

The section still says "Build and run", but the command was changed to docker-compose build, which only builds and does not start containers. Either switch back to an up command (optionally with --build) or update the heading/text to reflect a build-only step and add a separate run step.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated

# Check if the script is running as root
if [ "$(id -u)" -ne 0 ]; then
print_err "==> Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script."
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

This print_err line has unescaped double quotes around USER root, which will break shell parsing (unterminated string) and prevent the script from running. Escape the inner quotes or use single quotes for the message.

Suggested change
print_err "==> Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script."
print_err "==> Script must be run as root. Use sudo, su, or add \"USER root\" to your Dockerfile before running this script."

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +29 to +31
# Select the en_US.UTF-8 UTF-8 locale is available
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

Locale settings are inconsistent: the script exports en_US.UTF-8 here, but later writes en_GB.UTF-8 into /etc/profile.d/locale.sh. Align the exported LANG/LC_ALL values and the profile script edits to the same locale to avoid confusing or partial locale configuration.

Suggested change
# Select the en_US.UTF-8 UTF-8 locale is available
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Select the en_GB.UTF-8 locale so the current shell matches the persisted profile configuration
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +35 to +36
USER_UID=${2:-"root"}
USER_GID=${3:-"root"}
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

USER_UID/USER_GID default to the string "root", but later the script does numeric -ne comparisons against current uid/gid. If the script is invoked without explicit numeric UID/GID, these comparisons will fail. Consider defaulting to empty/0 and only performing numeric comparisons when the values are valid integers.

Suggested change
USER_UID=${2:-"root"}
USER_GID=${3:-"root"}
USER_UID=${2:-}
USER_GID=${3:-}

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/alpine-util.sh Outdated
Comment on lines +65 to +66
# Add 'update' as an alias in 'bash_history'
echo -e 'update' >> ${HOME}/.ash_history
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

Appending update to ${HOME}/.ash_history on every build/run will grow the file and can create many duplicates. Also echo -e is not portable across shells. Consider using printf and only adding the entry if it is not already present (or drop this behavior entirely).

Suggested change
# Add 'update' as an alias in 'bash_history'
echo -e 'update' >> ${HOME}/.ash_history
# Add 'update' to ash history once
if ! grep -qxF 'update' "${HOME}/.ash_history" 2>/dev/null; then
printf '%s\n' 'update' >> "${HOME}/.ash_history"
fi

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/Dockerfile.alpine Outdated
# 1. Execute the 'alpine-util.sh' script with USERNAME as an argument
# 2. Remove temporary files and directories
RUN ash "/tmp/${HELPER_SCRIPT_SRC}/${HELPER_SCRIPT}" "${USERNAME}" "${USER_UID}" "${USER_GID}" \
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

This cleanup path is Debian/Ubuntu-specific (/var/lib/apt/lists/*) and won’t remove any Alpine APK cache. Consider removing APK cache directories instead (e.g., /var/cache/apk/*) and keep the temp helper script cleanup.

Suggested change
&& rm -rf /var/lib/apt/lists/* "/tmp/${HELPER_SCRIPT_SRC}/"
&& rm -rf /var/cache/apk/* "/tmp/${HELPER_SCRIPT_SRC}/"

Copilot uses AI. Check for mistakes.
Comment thread Dockerfiles/scripts/debian-util.sh Outdated
Comment on lines +59 to +62
alias sou='. ${HOME}/.bashrc'

# Add 'update' as an alias in 'bash_history'
echo -e 'update' >> ~/.bash_history
echo -e 'update' >> ${HOME}/.bash_history
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

Appending update to ${HOME}/.bash_history on every build/run will grow the file and can create many duplicates, and echo -e has inconsistent behavior across shells. Prefer printf and/or ensure the line is only added once (or remove this behavior).

Copilot uses AI. Check for mistakes.
@gvatsal60
Copy link
Copy Markdown
Owner Author

@copilot Can you fix these changes in a professional way

Copilot AI review requested due to automatic review settings May 8, 2026 16:27
@gvatsal60 gvatsal60 review requested due to automatic review settings May 8, 2026 16:27
Agent-Logs-Url: https://github.com/gvatsal60/Custom-WSL-OS/sessions/39860a38-1068-458f-a6d1-1c6c9d200f6c

Co-authored-by: gvatsal60 <40350810+gvatsal60@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 16:28
@gvatsal60 gvatsal60 review requested due to automatic review settings May 8, 2026 16:28
Copilot AI review requested due to automatic review settings May 8, 2026 16:28
@gvatsal60 gvatsal60 review requested due to automatic review settings May 8, 2026 16:28
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Copy link
Copy Markdown

Copilot AI commented May 8, 2026

@copilot Can you fix these changes in a professional way

Implemented the requested professional cleanup and pushed the fixes in commit 0422e61 (plus preceding follow-up commits in this branch). This addresses the outstanding Alpine/Dockerfile/README review issues and adds validation hardening in the Alpine utility script.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /home/REDACTED/.local/bin/pre-commit /home/REDACTED/.local/bin/pre-commit run --all-files (dns block)
    • Triggering command: /home/REDACTED/.local/bin/pre-commit /home/REDACTED/.local/bin/pre-commit run --files Dockerfiles/scripts/alpine-util.sh Dockerfiles/scripts/debian-util.sh Dockerfiles/Dockerfile.alpine README.md /mod/golang.org/toolchain@v0.0.1-go1.25.4.linux-amd64/pkg/tool/linux_amd64/compile 64.s e/cgo le /mod/golang.org//tmp/go-build267712051/b303/ -o in.so le rgo/bin/git e/cgo ucture@v1.5.0/er-I le uname (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

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.

Add Support for Alpine Linux

3 participants