Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Alpine 3.21 Dockerfile #1284

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
82 changes: 82 additions & 0 deletions src/alpine/3.21/withnode/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
FROM amd64/alpine:3.21

# Install .NET and test dependencies
RUN apk add --upgrade --no-cache \
autoconf \
automake \
bash \
build-base \
brotli-dev \
ca-certificates \
clang \
clang-dev \
cmake \
coreutils \
cpio \
curl \
elfutils \
file \
gcc \
gettext-dev \
git \
icu-data-full \
icu-dev \
icu-libs \
iproute2 \
jq \
krb5-dev \
libtool \
less \
libgcc \
libintl \
libssl3 \
libstdc++ \
libunwind-dev \
linux-headers \
lld \
lldb-dev \
llvm \
lttng-ust-dev \
ncurses-terminfo-base \
make \
nodejs \
npm \
numactl-dev \
openssl \
openssl-dev \
paxctl \
pigz \
py3-lldb \
python3-dev \
shadow \
sudo \
tzdata \
userspace-rcu \
util-linux-dev \
which \
zlib-dev

# Install the latest non-preview powershell release.
RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust \
&& LATEST_TAG=$(curl -L https://api.github.com/repos/powershell/powershell/releases/latest | jq -r '.tag_name') \
&& curl -L https://github.com/PowerShell/PowerShell/releases/download/$LATEST_TAG/powershell-${LATEST_TAG#*v}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
&& mkdir -p /opt/microsoft/powershell \
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell \
&& chmod +x /opt/microsoft/powershell/pwsh \
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
&& rm -f /tmp/powershell.tar.gz

# Install azurecli from PIP
RUN azureEnv="/usr/local/share/azure-cli-env" && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this Dockerfile consistent with respect to the '&&` formatting? The previous section uses a prefix pattern where this section uses a suffix pattern. I have been trying to standardize around the prefix pattern.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 01d0447

python3 -m venv "$azureEnv" && \
"$azureEnv/bin/python" -m pip install --upgrade setuptools && \
"$azureEnv/bin/python" -m pip install azure-cli && \
ln -s "$azureEnv/bin/az" /usr/local/bin/az

# Add label for bring your own node in azure devops
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"

ENV NO_UPDATE_NOTIFIER=true

# Set node as a default command
CMD [ "node" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What requires this? It feels strange to have this set for a general build container.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wtgodbe - Does your infrastructure require this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, historically we've relied on it

12 changes: 12 additions & 0 deletions src/alpine/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@
"variant": "v8"
}
]
},
{
"platforms": [
{
"dockerfile": "src/alpine/3.21/withnode/amd64",
"os": "linux",
"osVersion": "alpine3.21",
"tags": {
"alpine-3.21-withnode-amd64": {}
}
}
]
}
]
}
Expand Down
Loading