Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1facecad09 | |||
| 235a111a5a | |||
| 3e6f1579bb | |||
| dc89aa89fe | |||
| 7da2232fbb | |||
| 8b0c53a3df | |||
| e0966c0006 | |||
| 87c5425cdb | |||
| 527153385d | |||
| b608435991 | |||
| 88cc1ba127 | |||
| 4ee6936730 | |||
| 914e236a3b | |||
| 09de26ef7c | |||
| c80f2650b6 | |||
| dd8aaffa23 |
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "yolks:apps_${{ matrix.app }}"
|
name: "apps:${{ matrix.app }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -47,4 +47,4 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/apps:${{ matrix.app }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/apps:${{ matrix.app }}
|
||||||
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/apps:{0}', matrix.app) || '' }}
|
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/apps:{0}', matrix.app) || '' }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "yolks:${{ matrix.oses }}"
|
name: "base:${{ matrix.oses }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -44,5 +44,5 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/yolks:${{ matrix.oses }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/base:${{ matrix.oses }}
|
||||||
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:{0}', matrix.oses) || '' }}
|
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/parkervcp/base:{0}', matrix.oses) || '' }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pushArm:
|
pushArm:
|
||||||
name: "yolks:bot_${{ matrix.tag }}"
|
name: "bot:${{ matrix.tag }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -57,8 +57,8 @@ jobs:
|
|||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/yolks:bot_${{ matrix.tag }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/bot:${{ matrix.tag }}
|
||||||
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:bot_{0}', matrix.tag) || '' }}
|
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/parkervcp/bot:{0}', matrix.tag) || '' }}
|
||||||
- name: Move cache
|
- name: Move cache
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/.buildx-cache
|
rm -rf /tmp/.buildx-cache
|
||||||
@@ -90,4 +90,4 @@ jobs:
|
|||||||
# platforms: linux/amd64
|
# platforms: linux/amd64
|
||||||
# push: true
|
# push: true
|
||||||
# tags: |
|
# tags: |
|
||||||
# ${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:bot_{0}', matrix.tag) || '' }}
|
# ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/bot:bot_{0}', matrix.tag) || '' }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "yolks:${{ matrix.tag }}"
|
name: "box64:${{ matrix.tag }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -42,5 +42,5 @@ jobs:
|
|||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/yolks:${{ matrix.tag }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/box64:${{ matrix.tag }}
|
||||||
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:{0}', matrix.tag) || '' }}
|
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/box64:{0}', matrix.tag) || '' }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "yolks:bun_${{ matrix.tag }}"
|
name: "bun:${{ matrix.tag }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -43,5 +43,5 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/yolks:bun_${{ matrix.tag }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/bun:${{ matrix.tag }}
|
||||||
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/yolks:bun_{0}', matrix.tag) || '' }}
|
${{ github.repository_owner == 'pelican-eggs' && format('ghcr.io/parkervcp/bun:{0}', matrix.tag) || '' }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "tarkov:tarkov_${{ matrix.tag }}"
|
name: "tarkov:${{ matrix.tag }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -40,8 +40,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./tarkov
|
context: ./tarkov
|
||||||
file: ./tarkov/${{ matrix.tag }}/Dockerfile
|
file: ./tarkov/${{ matrix.tag }}/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.lower-repo.outputs.repository }}/tarkov:tarkov_${{ matrix.tag }}
|
ghcr.io/${{ steps.lower-repo.outputs.repository }}/tarkov:${{ matrix.tag }}
|
||||||
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/yolks:tarkov_{0}', matrix.tag) || '' }}
|
${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/tarkov:{0}', matrix.tag) || '' }}
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
|
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt upgrade -y \
|
&& apt upgrade -y \
|
||||||
&& apt -y --no-install-recommends install ca-certificates curl git unzip zip tar jq
|
&& apt -y --no-install-recommends install ca-certificates curl git unzip zip tar jq sudo
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#!bin/bash
|
||||||
|
|
||||||
+53
-43
@@ -1,20 +1,16 @@
|
|||||||
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/yolks:ubuntu
|
# ==========================================
|
||||||
|
# STAGE 1: BUILDER
|
||||||
|
# ==========================================
|
||||||
|
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:ubuntu AS builder
|
||||||
|
|
||||||
LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me"
|
LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# 1. CRITICAL: Install CA Certificates and GPG tools FIRST
|
RUN apt-get update \
|
||||||
# This fixes the "exit code 100" (SSL/Download failure)
|
&& apt-get install -y ca-certificates gnupg lsb-release wget curl git git-lfs iproute2 libgdiplus tini software-properties-common \
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
ca-certificates \
|
|
||||||
gnupg \
|
|
||||||
lsb-release \
|
|
||||||
wget \
|
|
||||||
curl \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 2. Install .NET SDK
|
|
||||||
RUN wget -q https://dot.net/v1/dotnet-install.sh \
|
RUN wget -q https://dot.net/v1/dotnet-install.sh \
|
||||||
&& chmod +x dotnet-install.sh \
|
&& chmod +x dotnet-install.sh \
|
||||||
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
|
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
|
||||||
@@ -22,48 +18,62 @@ RUN wget -q https://dot.net/v1/dotnet-install.sh \
|
|||||||
&& ln -s /usr/share/dotnet /usr/bin/dotnet \
|
&& ln -s /usr/share/dotnet /usr/bin/dotnet \
|
||||||
&& rm dotnet-install.sh
|
&& rm dotnet-install.sh
|
||||||
|
|
||||||
# 3. Install PowerShell (Using the Ubuntu 22.04 repo)
|
RUN mkdir -p /etc/apt/keyrings \
|
||||||
# We add the repo manually to ensure it's correct
|
&& curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg \
|
||||||
RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb \
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod jammy main" > /etc/apt/sources.list.d/microsoft-prod.list \
|
||||||
&& dpkg -i packages-microsoft-prod.deb \
|
|
||||||
&& rm packages-microsoft-prod.deb \
|
|
||||||
# Force update again to ensure the new repo is picked up
|
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y powershell
|
&& apt-get install -y powershell \
|
||||||
|
|
||||||
# 4. Install remaining dependencies
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
git \
|
|
||||||
git-lfs \
|
|
||||||
iproute2 \
|
|
||||||
libgdiplus \
|
|
||||||
tini \
|
|
||||||
software-properties-common \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 5. Clone, Build, and Cleanup
|
WORKDIR /home/container/git
|
||||||
RUN mkdir -p /workspace/ /build/ \
|
RUN git clone https://github.com/2SharkyStudios/SPT-Server-Build.git . \
|
||||||
&& cd /workspace \
|
&& git lfs pull
|
||||||
&& git clone https://github.com/2SharkyStudios/SPT-Server-Build.git /workspace/git \
|
|
||||||
&& cd /workspace/git/ \
|
|
||||||
&& git lfs pull \
|
|
||||||
&& cd /workspace/git/SPTarkov.Server/ \
|
|
||||||
&& dotnet restore \
|
|
||||||
&& dotnet publish -o /build/ -c Release -p:SptBuildType=RELEASE -p:SptVersion=4.0.11 \
|
|
||||||
&& rm -rf /workspace/
|
|
||||||
|
|
||||||
# 6. Move build output to user home
|
WORKDIR /home/container/git/SPTarkov.Server/
|
||||||
RUN mv /build/* /home/container/ 2>/dev/null || true \
|
RUN dotnet restore \
|
||||||
&& chown -R container:container /home/container/
|
&& dotnet build -o /home/container/build/ -c Release -p:SptBuildType=RELEASE -p:SptVersion=4.0.11
|
||||||
|
|
||||||
|
# ==========================================
|
||||||
|
# STAGE 2: RUNTIME
|
||||||
|
# ==========================================
|
||||||
|
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:ubuntu AS runtime
|
||||||
|
|
||||||
|
LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y ca-certificates gnupg lsb-release wget curl \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN wget -q https://dot.net/v1/dotnet-install.sh \
|
||||||
|
&& chmod +x dotnet-install.sh \
|
||||||
|
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
|
||||||
|
&& ./dotnet-install.sh -i /usr/share -v "$D_V" \
|
||||||
|
&& ln -s /usr/share/dotnet /usr/bin/dotnet \
|
||||||
|
&& rm dotnet-install.sh
|
||||||
|
|
||||||
|
RUN mkdir -p /etc/apt/keyrings \
|
||||||
|
&& curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg \
|
||||||
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod jammy main" > /etc/apt/sources.list.d/microsoft-prod.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y powershell \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y iproute2 libgdiplus tini \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /home/container/
|
||||||
|
COPY --from=builder /home/container/build/ /home/container/
|
||||||
|
|
||||||
USER container
|
USER container
|
||||||
ENV USER=container HOME=/home/container
|
ENV USER=container HOME=/home/container
|
||||||
WORKDIR /home/container
|
|
||||||
|
|
||||||
STOPSIGNAL SIGINT
|
|
||||||
|
|
||||||
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
|
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
Reference in New Issue
Block a user