Add Dotnet 2.1, 3.1, 5.0 Docker Images (#9)

* Add Dotnet 2.1, 3.2, 5.0 Docker Images
This commit is contained in:
Torsten Widmann
2021-08-24 19:10:35 +02:00
committed by GitHub
parent 581038a328
commit 61e341587e
6 changed files with 123 additions and 0 deletions

41
.github/workflows/dotnet.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: build dotnet
on:
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- master
paths:
- dotnet/**
jobs:
push:
name: "yolks:dotnet_${{ matrix.tag }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 2.1
- 3.1
- 5.0
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
with:
version: "v0.5.1"
buildkitd-flags: --debug
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: ./dotnet
file: ./dotnet/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/parkervcp/yolks:dotnet_${{ matrix.tag }}

View File

@@ -37,6 +37,13 @@ is tagged correctly.
* `ghcr.io/parkervcp/yolks:cassandra_java11_python2`
* [`cassandra_java11_python3`](/cassandra/cassandra_java11_python3)
* `ghcr.io/parkervcp/yolks:cassandra_java11_python3`
### [dotNet](/dotnet)
* [`dotnet2.1`](/dotnet/2.1)
* `ghcr.io/parkervcp/yolks:dotnet_2.1`
* [`dotnet3.1`](/dotnet/3.1)
* `ghcr.io/parkervcp/yolks:dotnet_3.1`
* [`dotnet5.0`](/dotnet/5.0)
* `ghcr.io/parkervcp/yolks:dotnet_5.0`
### [Erlang](/erlang)
* [`erlang22`](/erlang/22)
* `ghcr.io/parkervcp/yolks:erlang_22`

21
dotnet/2.1/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM ghcr.io/parkervcp/yolks:debian
LABEL author="Torsten Widmann" maintainer="info@goover.de"
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget iproute2 \
&& wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt update -y \
&& apt install -y aspnetcore-runtime-2.1 libgdiplus
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

21
dotnet/3.1/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM ghcr.io/parkervcp/yolks:debian
LABEL author="Torsten Widmann" maintainer="info@goover.de"
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget iproute2 \
&& wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt update -y \
&& apt install -y aspnetcore-runtime-3.1 libgdiplus
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

21
dotnet/5/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM ghcr.io/parkervcp/yolks:debian
LABEL author="Torsten Widmann" maintainer="info@goover.de"
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget iproute2 \
&& wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt update -y \
&& apt install -y aspnetcore-runtime-5.0 libgdiplus
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

12
dotnet/entrypoint.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
cd /home/container
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
eval ${MODIFIED_STARTUP}