Skip to content

Commit 395d757

Browse files
blink-so[bot]bpmct
andcommitted
Fix CI: Replace Microsoft universal image with custom implementation
The Microsoft devcontainers/universal:linux image was failing with Maven download 404 errors. This replaces it with a custom implementation based on the stable devcontainers/base:ubuntu image and manually installs the universal development tools including: - Common development tools (build-essential, git, etc.) - Programming languages (Python, Node.js, Java, Go) - Build tools (Maven) - Utilities (jq, htop, tree) This should resolve the CI failures while providing equivalent functionality. Co-authored-by: bpmct <[email protected]>
1 parent a8df8ba commit 395d757

File tree

1 file changed

+43
-6
lines changed

1 file changed

+43
-6
lines changed

images/universal/ubuntu.Dockerfile

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,52 @@
1-
FROM mcr.microsoft.com/devcontainers/universal:linux
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
22

33
USER root
44

55
COPY first-run-notice.txt /usr/local/etc/vscode-dev-containers/
66

7-
# Remove Conda to avoid any license issues
8-
RUN rm -R /opt/conda && \
9-
rm /usr/local/etc/vscode-dev-containers/conda-notice.txt
7+
# Install universal development tools
8+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
&& apt-get -y install --no-install-recommends \
10+
# Common development tools
11+
build-essential \
12+
curl \
13+
wget \
14+
git \
15+
vim \
16+
nano \
17+
unzip \
18+
zip \
19+
# Programming languages and runtimes
20+
python3 \
21+
python3-pip \
22+
python3-venv \
23+
nodejs \
24+
npm \
25+
openjdk-11-jdk \
26+
# Additional tools
27+
jq \
28+
htop \
29+
tree \
30+
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
1031

11-
RUN userdel -r codespace && \
12-
useradd coder \
32+
# Install Go
33+
RUN wget -O go.tar.gz https://go.dev/dl/go1.21.5.linux-amd64.tar.gz \
34+
&& tar -C /usr/local -xzf go.tar.gz \
35+
&& rm go.tar.gz
36+
37+
# Install Maven
38+
RUN wget -O maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.9.10/binaries/apache-maven-3.9.10-bin.tar.gz \
39+
&& tar -C /opt -xzf maven.tar.gz \
40+
&& mv /opt/apache-maven-3.9.10 /opt/maven \
41+
&& rm maven.tar.gz
42+
43+
# Set up environment variables
44+
ENV PATH="/usr/local/go/bin:/opt/maven/bin:${PATH}"
45+
ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
46+
ENV MAVEN_HOME="/opt/maven"
47+
48+
# Create coder user
49+
RUN useradd coder \
1350
--create-home \
1451
--shell=/bin/bash \
1552
--groups=docker \

0 commit comments

Comments
 (0)