Skip to content

Commit adf706c

Browse files
authored
Merge pull request #8 from ptr727/develop
Remove .NET Core 3.0 and .NET 5 to update to Jammy
2 parents 8f20761 + 172b8ef commit adf706c

File tree

3 files changed

+45
-60
lines changed

3 files changed

+45
-60
lines changed

.github/workflows/BuildPublishPipeline.yml

Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@ env:
55
DOCKER_PUSH: ${{ github.ref == 'refs/heads/main' }}
66

77
on:
8-
workflow_dispatch:
98
push:
10-
branches:
11-
- main
12-
- develop
13-
paths-ignore:
14-
- 'README.md'
9+
branches: [main, develop]
10+
paths-ignore: [README.md]
1511
pull_request:
16-
branches:
17-
- main
12+
branches: [main]
13+
workflow_dispatch:
1814
schedule:
19-
# https://crontab.guru/
20-
# Rebuild 2am every Monday, LSIO rebuilds on Friday's
21-
- cron: '0 2 * * MON'
15+
- cron: "0 2 * * MON"
2216

2317
jobs:
2418
build:
@@ -27,72 +21,60 @@ jobs:
2721

2822
steps:
2923

30-
# https://github.com/actions/checkout
24+
# https://github.com/marketplace/actions/checkout
3125
- name: 'Checkout Code'
32-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
3327

34-
# https://github.com/docker/setup-qemu-action
28+
# https://github.com/marketplace/actions/docker-setup-qemu
3529
- name: 'Setup QEMU'
36-
uses: docker/setup-qemu-action@v1
30+
uses: docker/setup-qemu-action@v2
3731

38-
# https://github.com/docker/setup-buildx-action
32+
# https://github.com/marketplace/actions/docker-setup-buildx
3933
- name: 'Setup Docker Buildx'
40-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v2
4135

4236
# https://github.com/marketplace/actions/docker-login
4337
- name: 'Login to Docker Hub'
44-
uses: docker/login-action@v1
38+
uses: docker/login-action@v2
4539
with:
4640
username: ${{ secrets.DOCKER_HUB_USERNAME }}
4741
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
4842

4943
# https://github.com/marketplace/actions/build-and-push-docker-images
5044

51-
# .NET Core 3.1
52-
- name: 'Build and Push .NET Core 3.1'
53-
uses: docker/build-push-action@v2
54-
with:
55-
platforms: linux/amd64
56-
push: ${{ env.DOCKER_PUSH }}
57-
tags: |
58-
ptr727/vscode-server-dotnetcore:3.1
59-
build-args: |
60-
LABEL_VERSION=3.1
61-
INSTALL_VERSION=dotnet-sdk-3.1
62-
63-
# .NET 5.0
64-
- name: 'Build and Push .NET 5.0'
65-
uses: docker/build-push-action@v2
45+
# .NET 6.0
46+
- name: 'Build and Push .NET 6.0'
47+
uses: docker/build-push-action@v4
6648
with:
6749
platforms: linux/amd64
6850
push: ${{ env.DOCKER_PUSH }}
6951
tags: |
70-
ptr727/vscode-server-dotnetcore:5.0
52+
ptr727/vscode-server-dotnetcore:6.0
7153
build-args: |
72-
LABEL_VERSION=5.0
73-
INSTALL_VERSION=dotnet-sdk-5.0
54+
LABEL_VERSION=6.0
55+
INSTALL_VERSION=dotnet-sdk-6.0
7456
75-
# .NET 6.0
76-
- name: 'Build and Push .NET 6.0'
77-
uses: docker/build-push-action@v2
57+
# .NET 7.0
58+
- name: 'Build and Push .NET 7.0'
59+
uses: docker/build-push-action@v4
7860
with:
7961
platforms: linux/amd64
8062
push: ${{ env.DOCKER_PUSH }}
8163
tags: |
82-
ptr727/vscode-server-dotnetcore:6.0
64+
ptr727/vscode-server-dotnetcore:7.0
8365
build-args: |
84-
LABEL_VERSION=6.0
85-
INSTALL_VERSION=dotnet-sdk-6.0
66+
LABEL_VERSION=7.0
67+
INSTALL_VERSION=dotnet-sdk-7.0
8668
87-
# .NET Core 3.1, .NET 5.0, and .NET 6.0
88-
- name: 'Build and Push .NET Core 3.1, .NET 5.0, and .NET 6.0'
89-
uses: docker/build-push-action@v2
69+
# .NET 6.0 and .NET 7.0
70+
- name: 'Build and Push .NET 6.0 and .NET 7.0'
71+
uses: docker/build-push-action@v4
9072
with:
9173
platforms: linux/amd64
9274
push: ${{ env.DOCKER_PUSH }}
9375
tags: |
9476
ptr727/vscode-server-dotnetcore:latest
95-
ptr727/vscode-server-dotnetcore:31.50.60
77+
ptr727/vscode-server-dotnetcore:60.70
9678
build-args: |
97-
LABEL_VERSION=31.50.60
98-
"INSTALL_VERSION=dotnet-sdk-3.1 dotnet-sdk-5.0 dotnet-sdk-6.0"
79+
LABEL_VERSION=60.70
80+
"INSTALL_VERSION=dotnet-sdk-6.0 dotnet-sdk-7.0"

Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
# export DEBIAN_FRONTEND=noninteractive
44

55
# https://github.com/linuxserver/docker-code-server
6-
# Build from focal, not jammy / latest
7-
# https://github.com/dotnet/core/issues/7038
8-
# https://github.com/dotnet/core/issues/7699
9-
FROM lscr.io/linuxserver/code-server:focal
6+
FROM lscr.io/linuxserver/code-server:latest
107

11-
ARG LABEL_VERSION="31.50.60"
12-
ARG INSTALL_VERSION="dotnet-sdk-3.1 dotnet-sdk-5.0 dotnet-sdk-6.0"
8+
ARG LABEL_VERSION="60.70"
9+
ARG INSTALL_VERSION="dotnet-sdk-6.0 dotnet-sdk-7.0"
1310

1411
LABEL name="VSCode-Server-DotNet" \
1512
version=${LABEL_VERSION} \
@@ -30,10 +27,15 @@ RUN apt-get update \
3027
# Install pre-requisites
3128
&& apt-get install -y wget apt-transport-https software-properties-common \
3229
# Register the Microsoft repository
33-
&& wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -sr)/packages-microsoft-prod.deb \
30+
&& wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -sr)/packages-microsoft-prod.deb \
3431
&& dpkg -i packages-microsoft-prod.deb \
35-
# Enable universe repositories
36-
&& sudo add-apt-repository universe \
32+
&& rm packages-microsoft-prod.deb \
33+
&& touch /etc/apt/preferences \
34+
&& echo "Package: *" >> /etc/apt/preferences \
35+
&& echo "Pin: origin \"packages.microsoft.com\"" >> /etc/apt/preferences \
36+
&& echo "Pin-Priority: 1001" >> /etc/apt/preferences \
37+
&& cat /etc/apt/preferences \
38+
&& cat /etc/apt/sources.list.d/microsoft-prod.list \
3739
# Update
3840
&& apt-get update \
3941
&& apt-get upgrade -y \

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Docker image is based on [LinuxServer.io Code-Server](https://github.com/linuxse
1111

1212
[Code and Pipline is on GitHub](https://github.com/ptr727/VSCode-Server-DotNetCore):
1313
![GitHub Last Commit](https://img.shields.io/github/last-commit/ptr727/VSCode-Server-DotNetCore?logo=github)
14-
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ptr727/VSCode-Server-DotNetCore/Build%20and%20Publish%20Docker%20Images?logo=github)
14+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ptr727/VSCode-Server-DotNetCore/BuildPublishPipeline.yml?logo=github)
1515

1616
## Container Images
1717

1818
Docker container images are published on [Docker Hub](https://hub.docker.com/r/ptr727/vscode-server-dotnetcore).
19-
Images are tagged using `latest`, `3.1`, `5.0`, and `6.0`.
20-
`latest` includes .NET Core 3.1 and .NET 5.0 and .NET 6.0.
19+
Images are tagged using `latest`, `6.0`, and `7.0`.
20+
`latest` includes .NET 6.0 and .NET 7.0.
2121
Images are automatically rebuilt every Monday morning, picking up the latest updates.
2222
![Docker Pulls](https://img.shields.io/docker/pulls/ptr727/vscode-server-dotnetcore?logo=docker)
2323
![Docker Image Version](https://img.shields.io/docker/v/ptr727/vscode-server-dotnetcore/latest?logo=docker)
@@ -37,6 +37,7 @@ Follow the [linuxserver/code-server](https://github.com/linuxserver/docker-code-
3737

3838
## Notes
3939

40+
- .NET 5 and .NET Core 3.1 and older are [no longer supported](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) on Ubuntu Jammy.
4041
- codercom/code-server runs as root, not permission friendly when mapping volumes.
4142
- linuxserver/code-server allows specifying PUID and GUID, ideal when using mapped volumes in e.g. UnRaid.
4243
- Use `cat /etc/*-release` to determine the base image, installed packages must match the base image.

0 commit comments

Comments
 (0)