From fea425805e56257ca9dd336e2d80ef43c6d9f238 Mon Sep 17 00:00:00 2001 From: Yasitha Nadeeshan Date: Wed, 3 Dec 2025 02:09:38 +0530 Subject: [PATCH 1/2] fix: dockerfile for multiplatform support --- dockerfiles/ubuntu/Dockerfile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dockerfiles/ubuntu/Dockerfile b/dockerfiles/ubuntu/Dockerfile index 801b98a..6f8b77e 100644 --- a/dockerfiles/ubuntu/Dockerfile +++ b/dockerfiles/ubuntu/Dockerfile @@ -1,8 +1,10 @@ -ARG UBUNTU_VERSION -FROM mcr.microsoft.com/devcontainers/base:ubuntu-${UBUNTU_VERSION} +ARG UBUNTU_VERSION=22.04 +FROM ubuntu:${UBUNTU_VERSION} -USER root +# Avoid interactive prompts during package installation +ENV DEBIAN_FRONTEND=noninteractive +# Install packages as root RUN apt-get update && apt-get install -y \ build-essential \ wget \ @@ -13,6 +15,23 @@ RUN apt-get update && apt-get install -y \ ca-certificates \ lsb-release \ apt-transport-https \ - telnet + telnet \ + sudo \ + git \ + && rm -rf /var/lib/apt/lists/* +# Create vscode user with same setup as devcontainer +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid ${USER_GID} ${USERNAME} \ + && useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} -s /bin/bash \ + && echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} \ + && chmod 0440 /etc/sudoers.d/${USERNAME} + +# Switch to vscode user USER vscode +WORKDIR /home/vscode + +ENV DEBIAN_FRONTEND=dialog From 81a92a0219bd0af815c760fdd38740f8e9c68f2a Mon Sep 17 00:00:00 2001 From: Yasitha Nadeeshan Date: Wed, 3 Dec 2025 09:53:00 +0530 Subject: [PATCH 2/2] refactor: only include microsoft devcontainer base image --- dockerfiles/ubuntu/Dockerfile | 39 ++--------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/dockerfiles/ubuntu/Dockerfile b/dockerfiles/ubuntu/Dockerfile index 6f8b77e..22f2bb3 100644 --- a/dockerfiles/ubuntu/Dockerfile +++ b/dockerfiles/ubuntu/Dockerfile @@ -1,37 +1,2 @@ -ARG UBUNTU_VERSION=22.04 -FROM ubuntu:${UBUNTU_VERSION} - -# Avoid interactive prompts during package installation -ENV DEBIAN_FRONTEND=noninteractive - -# Install packages as root -RUN apt-get update && apt-get install -y \ - build-essential \ - wget \ - curl \ - libffi-dev \ - libsqlite3-dev \ - software-properties-common \ - ca-certificates \ - lsb-release \ - apt-transport-https \ - telnet \ - sudo \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Create vscode user with same setup as devcontainer -ARG USERNAME=vscode -ARG USER_UID=1000 -ARG USER_GID=1000 - -RUN groupadd --gid ${USER_GID} ${USERNAME} \ - && useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} -s /bin/bash \ - && echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} \ - && chmod 0440 /etc/sudoers.d/${USERNAME} - -# Switch to vscode user -USER vscode -WORKDIR /home/vscode - -ENV DEBIAN_FRONTEND=dialog +ARG UBUNTU_VERSION +FROM mcr.microsoft.com/devcontainers/base:ubuntu-${UBUNTU_VERSION} \ No newline at end of file