Skip to content

Commit 3c8cef1

Browse files
authored
[universal] - Image change ubuntu focal EOL (#1404)
* Universal image ubuntu focal EOL * Version bump & removal of commented line. * Installing libssl 1.1 from archive to help php installation work using oryx * Additional comments added * Removing the version bump * Major version bump and removing commented lines
1 parent 33be05e commit 3c8cef1

File tree

3 files changed

+43
-31
lines changed

3 files changed

+43
-31
lines changed

src/universal/.devcontainer/Dockerfile

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM ubuntu:focal
6+
FROM ubuntu:noble
77

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

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

1416
ENV LANG="C.UTF-8"
1517

16-
# Install basic build tools
17-
RUN apt-get update \
18+
#Merging the mutiple layers to reduce the size of the image slightly
19+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
20+
# Restore man command
21+
&& yes | unminimize 2>&1 \
22+
# Install basic build tools
1823
&& apt-get upgrade -y \
1924
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
2025
make \
@@ -35,14 +40,13 @@ RUN apt-get update \
3540
libgdiplus \
3641
jq \
3742
# By default pip is not available in the buildpacks image
38-
python-pip-whl \
3943
python3-pip \
4044
#.NET Core related pre-requisites
4145
libc6 \
4246
libgcc1 \
4347
libgssapi-krb5-2 \
44-
libncurses5 \
45-
liblttng-ust0 \
48+
libncurses6 \
49+
liblttng-ust1 \
4650
libssl-dev \
4751
libstdc++6 \
4852
zlib1g \
@@ -61,35 +65,43 @@ RUN apt-get update \
6165
&& apt-get update \
6266
&& apt-get upgrade -y \
6367
&& add-apt-repository universe \
64-
&& rm -rf /var/lib/apt/lists/*
65-
66-
# Verify expected build and debug tools are present
67-
RUN apt-get update \
68+
&& rm -rf /var/lib/apt/lists/* \
69+
# Verify expected build and debug tools are present
70+
&& apt-get update \
6871
&& apt-get -y install build-essential cmake cppcheck valgrind clang lldb llvm gdb python3-dev \
6972
# Install tools and shells not in common script
7073
&& apt-get install -yq vim vim-doc xtail software-properties-common libsecret-1-dev \
71-
# Install additional tools (useful for 'puppeteer' project)
72-
&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
73-
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
7474
# Clean up
7575
&& apt-get autoremove -y && apt-get clean -y \
7676
# Move first run notice to right spot
7777
&& mkdir -p "/usr/local/etc/vscode-dev-containers/" \
78-
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/
78+
&& mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/ \
79+
# Install and setup fish
80+
&& apt-get install -yq fish \
81+
&& 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" \
82+
&& printf "$FISH_PROMPT" >> /etc/fish/functions/fish_prompt.fish \
83+
&& 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 \
84+
# Remove scripts now that we're done with them
85+
&& apt-get clean -y && rm -rf /tmp/scripts
86+
87+
# Install libssl1.1 for oryx compatibility based on architecture
88+
RUN ARCH=$(uname -m) && \
89+
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ]; then \
90+
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 && \
91+
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
92+
rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \
93+
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
94+
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 && \
95+
dpkg -i libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \
96+
rm libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \
97+
else \
98+
echo "Unsupported architecture: $ARCH" && exit 1; \
99+
fi
79100

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

84-
# Install and setup fish
85-
RUN apt-get install -yq fish \
86-
&& 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" \
87-
&& printf "$FISH_PROMPT" >> /etc/fish/functions/fish_prompt.fish \
88-
&& 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
89-
90-
# Remove scripts now that we're done with them
91-
RUN apt-get clean -y && rm -rf /tmp/scripts
92-
93105
# Mount for docker-in-docker
94106
VOLUME [ "/var/lib/docker" ]
95107

src/universal/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"version": "2.13.1",
2+
"version": "3.0.0",
33
"build": {
44
"latest": true,
55
"rootDistro": "debian",
66
"tags": [
7-
"universal:${VERSION}-focal",
7+
"universal:${VERSION}-noble",
88
"universal:${VERSION}-linux",
99
"universal:${VERSION}"
1010
]
1111
},
1212
"dependencies": {
1313
"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`.",
14-
"image": "ubuntu:focal",
14+
"image": "ubuntu:noble",
1515
"imageLink": "https://hub.docker.com/_/ubuntu",
1616
"apt": [
1717
{

src/universal/test-project/test-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ checkCommon()
125125
libc6 \
126126
libgcc1 \
127127
libgssapi-krb5-2 \
128-
liblttng-ust0 \
128+
liblttng-ust1 \
129129
libstdc++6 \
130130
zlib1g \
131131
locales \

0 commit comments

Comments
 (0)