Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
70 changes: 43 additions & 27 deletions src/universal/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM ubuntu:focal
FROM ubuntu:noble

COPY first-run-notice.txt /tmp/scripts/
RUN if id "ubuntu" &>/dev/null; then \
echo "Deleting user 'ubuntu' for noble" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user for noble"; \
else \
echo "User 'ubuntu' does not exist for noble"; \
fi

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Restore man command
&& yes | unminimize 2>&1
COPY first-run-notice.txt /tmp/scripts/

ENV LANG="C.UTF-8"

# Install basic build tools
RUN apt-get update \
#Merging the mutiple layers to reduce the size of the image slightly
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Restore man command
&& yes | unminimize 2>&1 \
# Install basic build tools
&& apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
Expand All @@ -35,14 +40,13 @@ RUN apt-get update \
libgdiplus \
jq \
# By default pip is not available in the buildpacks image
python-pip-whl \
python3-pip \
#.NET Core related pre-requisites
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libncurses5 \
liblttng-ust0 \
libncurses6 \
liblttng-ust1 \
libssl-dev \
libstdc++6 \
zlib1g \
Expand All @@ -61,35 +65,47 @@ RUN apt-get update \
&& apt-get update \
&& apt-get upgrade -y \
&& add-apt-repository universe \
&& rm -rf /var/lib/apt/lists/*

# Verify expected build and debug tools are present
RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
# Verify expected build and debug tools are present
&& apt-get update \
&& apt-get -y install build-essential cmake cppcheck valgrind clang lldb llvm gdb python3-dev \
# Install tools and shells not in common script
&& apt-get install -yq vim vim-doc xtail software-properties-common libsecret-1-dev \
# Install additional tools (useful for 'puppeteer' project)
&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
# Install additional tools (useful for 'puppeteer' project). Uncomment next couple lines for puppeteer.
# As of now puppeteer is out of support since March 2025(0.4.11) images release.
#&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
#libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
# Clean up
&& apt-get autoremove -y && apt-get clean -y \
# Move first run notice to right spot
&& mkdir -p "/usr/local/etc/vscode-dev-containers/" \
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/ \
# Install and setup fish
&& apt-get install -yq fish \
&& FISH_PROMPT="function fish_prompt\n set_color green\n echo -n (whoami)\n set_color normal\n echo -n \":\"\n set_color blue\n echo -n (pwd)\n set_color normal\n echo -n \"> \"\nend\n" \
&& printf "$FISH_PROMPT" >> /etc/fish/functions/fish_prompt.fish \
&& printf "if type code-insiders > /dev/null 2>&1; and not type code > /dev/null 2>&1\n alias code=code-insiders\nend" >> /etc/fish/conf.d/code_alias.fish \
# Remove scripts now that we're done with them
&& apt-get clean -y && rm -rf /tmp/scripts

# Install libssl1.1 for oryx compatibility based on architecture
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ]; then \
curl -fsSL -o libssl1.1_1.1.0g-2ubuntu4_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
curl -fsSL -o libssl1.1_1.1.1f-1ubuntu2_arm64.deb http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \
dpkg -i libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \
rm libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi

# Default to bash shell (other shells available at /usr/bin/fish and /usr/bin/zsh)
ENV SHELL=/bin/bash \
DOCKER_BUILDKIT=1

# Install and setup fish
RUN apt-get install -yq fish \
&& FISH_PROMPT="function fish_prompt\n set_color green\n echo -n (whoami)\n set_color normal\n echo -n \":\"\n set_color blue\n echo -n (pwd)\n set_color normal\n echo -n \"> \"\nend\n" \
&& printf "$FISH_PROMPT" >> /etc/fish/functions/fish_prompt.fish \
&& printf "if type code-insiders > /dev/null 2>&1; and not type code > /dev/null 2>&1\n alias code=code-insiders\nend" >> /etc/fish/conf.d/code_alias.fish

# Remove scripts now that we're done with them
RUN apt-get clean -y && rm -rf /tmp/scripts

# Mount for docker-in-docker
VOLUME [ "/var/lib/docker" ]

Expand Down
4 changes: 2 additions & 2 deletions src/universal/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"latest": true,
"rootDistro": "debian",
"tags": [
"universal:${VERSION}-focal",
"universal:${VERSION}-noble",
"universal:${VERSION}-linux",
"universal:${VERSION}"
]
},
"dependencies": {
"annotation": "This document describes the base contents of the Universal image. Note that this image also includes detection logic to dynamically install additional language / runtime versions based on your repository's contents. Dynamically installed content can be found in sub-folders under `/opt`.",
"image": "ubuntu:focal",
"image": "ubuntu:noble",
"imageLink": "https://hub.docker.com/_/ubuntu",
"apt": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/universal/test-project/test-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ checkCommon()
libc6 \
libgcc1 \
libgssapi-krb5-2 \
liblttng-ust0 \
liblttng-ust1 \
libstdc++6 \
zlib1g \
locales \
Expand Down