Repository navigation
Expand file tree
/
Copy pathDockerfile.ci
More file actions
70 lines (58 loc) · 2.26 KB
/
Copy pathDockerfile.ci
File metadata and controls
70 lines (58 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:24.04
# Install system dependencies including Docker CLI
RUN apt-get update && apt-get install -y \
gnupg \
ca-certificates \
wget \
curl \
git \
build-essential \
docker.io \
&& rm -rf /var/lib/apt/lists/*
# Install Go 1.25.4
RUN wget https://go.dev/dl/go1.25.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.25.4.linux-amd64.tar.gz && \
rm go1.25.4.linux-amd64.tar.gz
# Set Go environment variables
ENV GOPATH="/go" \
PATH="/usr/local/go/bin:${PATH}:/go/bin"
# Add Mono repository and install Mono + .NET
RUN gpg --homedir /tmp --no-default-keyring \
--keyring /tmp/mono-keyring.gpg \
--keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
gpg --homedir /tmp --no-default-keyring \
--keyring /tmp/mono-keyring.gpg \
--export > /usr/share/keyrings/mono-official-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" \
> /etc/apt/sources.list.d/mono-official-stable.list && \
apt-get update && \
apt-get install -y mono-devel && \
rm -rf /var/lib/apt/lists/*
# Install .NET 8.0 SDK
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm dotnet-install.sh
# Install Chocolatey
RUN mkdir -p /opt/choco && \
cd /opt/choco && \
wget https://labs.koszek.com/chocolatey.v2.6.0-alpha0130.tar.gz && \
tar xzf chocolatey.v2.6.0-alpha0130.tar.gz && \
rm chocolatey.v2.6.0-alpha0130.tar.gz
# Create choco wrapper script
RUN echo '#!/bin/sh\nmono /opt/choco/choco.exe "$@" --allow-unofficial' > /usr/local/bin/choco && \
chmod 755 /usr/local/bin/choco
# Install golangci-lint v2.5.0
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin v2.5.0
# Create choco lib directory
RUN mkdir -p /opt/choco/lib
# Verify installations
RUN go version && \
golangci-lint version && \
choco -v && \
mono --version && \
dotnet --version
WORKDIR /workspace