Skip to content

Commit

Permalink
Merge pull request #134 from gitfool/renovate/major-dotnet-monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
gitfool authored Feb 9, 2025
2 parents dc8beec + 21b3d4b commit a56f1af
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
displayName: Install dotnet
inputs:
# renovate: datasource=dotnet depName=dotnet-sdk
version: 8.0.405
version: 9.0.102

- bash: dotnet tool restore && dotnet cake --verbosity=verbose
displayName: Cake build
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/setup-dotnet@v4.3.0
with:
# renovate: datasource=dotnet depName=dotnet-sdk
dotnet-version: 8.0.405
dotnet-version: 9.0.102

- name: Docker login
if: github.event_name != 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ build:
script:
- curl -fsSL https://get.docker.com/ | bash -s
# renovate: datasource=dotnet depName=dotnet-sdk
- curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --version 8.0.405
- curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --version 9.0.102
- export DOTNET_ROOT=$HOME/.dotnet && export PATH=$DOTNET_ROOT:$PATH
- dotnet tool restore && dotnet cake --verbosity=verbose
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/sdk:8.0.405-jammy
FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble

LABEL org.opencontainers.image.source=/~https://github.com/gitfool/cake-docker

Expand All @@ -8,7 +8,6 @@ ARG TARGETARCH

# Configure dotnet sdk
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \
DOTNET_NOLOGO=true \
DOTNET_ROLL_FORWARD=Major

RUN dotnet --info
Expand All @@ -17,9 +16,9 @@ RUN dotnet --info
RUN <<EOF
set -ex
apt-get update
apt-get install --no-install-recommends -y bash-completion ca-certificates curl gnupg sudo unzip vim zip zstd
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xe1dd270288b4e6030699e45fa1715d88e1df1f24' | gpg --dearmor -o /usr/share/keyrings/git-ppa.gpg
echo 'deb [signed-by=/usr/share/keyrings/git-ppa.gpg] https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy main' | tee /etc/apt/sources.list.d/git-ppa.list
apt-get install --no-install-recommends -y bash-completion ca-certificates curl gnupg lsb-release sudo unzip vim zip zstd
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf911ab184317630c59970973e363c90f8f1b6217" | gpg --dearmor -o /usr/share/keyrings/git-ppa.gpg
echo "deb [signed-by=/usr/share/keyrings/git-ppa.gpg] https://ppa.launchpadcontent.net/git-core/ppa/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/git-ppa.list
apt-get update
apt-get install --no-install-recommends -y git git-lfs
rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -88,18 +87,16 @@ RUN <<EOF
docker-compose --version
EOF

# Add non-root user
# Modify non-root user
RUN <<EOF
set -ex
groupadd --gid 1000 user
useradd --uid 1000 --gid 1000 --shell /bin/bash -m user
groupadd docker
usermod --append --groups docker user
echo "user ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/user
chmod 0440 /etc/sudoers.d/user
usermod --append --groups docker ubuntu
echo "ubuntu ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/ubuntu
chmod 0440 /etc/sudoers.d/ubuntu
EOF

USER user
USER ubuntu

RUN <<EOF
set -ex
Expand Down

0 comments on commit a56f1af

Please sign in to comment.