Skip to content

Commit

Permalink
starting to rewrite deportdownloader images, because they will be def…
Browse files Browse the repository at this point in the history
…ault in my egg in future
  • Loading branch information
gOOvER committed Dec 14, 2024
1 parent cb3445f commit 14188ab
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 56 deletions.
14 changes: 7 additions & 7 deletions depotdl/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ FROM --platform=$BUILDPLATFORM debian:bookworm-slim
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=AGPL
LABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and PterodactylLABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and Pterodactyl
LABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and Pterodactyl

Check warning on line 6 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 6 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/


ARG DEBIAN_FRONTEND=noninteractive

COPY sources.list /etc/apt/sources.list
RUN dpkg --add-architecture i386
RUN apt update
RUN apt -y upgrade
Expand Down Expand Up @@ -96,8 +96,8 @@ RUN apt update -y \
&& rm packages-microsoft-prod.deb \
&& apt update -y \
&& apt install -y \
aspnetcore-runtime-8.0 \
dotnet-sdk-8.0
aspnetcore-runtime-9.0 \
dotnet-sdk-9.0

RUN curl -sLOJ $(curl -s https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep linux-x64.zip)
RUN unzip DepotDownloader-linux-x64.zip -d /usr/local/bin/
Expand All @@ -112,8 +112,8 @@ RUN cd /tmp/ \
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LANG en_US.UTF-8

Check warning on line 115 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 115 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 116 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 116 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 117 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 117 in depotdl/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:debian

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID
Expand All @@ -135,4 +135,4 @@ STOPSIGNAL SIGINT
COPY --chown=container:container ../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]
CMD ["/entrypoint.sh"]
42 changes: 17 additions & 25 deletions depotdl/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
HOME=/home/container

# Wait for the container to fully initialize
sleep 1
Expand Down Expand Up @@ -35,39 +36,30 @@ echo -e "${GREEN}Starting Server.... Please wait...${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"

## just in case someone removed the defaults.
#if [ "${STEAM_USER}" == "" ]; then
# echo -e "${BLUE}---------------------------------------------------------------------${NC}"
# echo -e "${YELLOW}Steam user is not set. ${NC}"
# echo -e "${YELLOW}Using anonymous user.${NC}"
# echo -e "${BLUE}---------------------------------------------------------------------${NC}"
# STEAM_USER=anonymous
# STEAM_PASS=""
# STEAM_AUTH=""
#else
# echo -e "${BLUE}---------------------------------------------------------------------${NC}"
# echo -e "${YELLOW}user set to ${STEAM_USER} ${NC}"
# echo -e "${BLUE}---------------------------------------------------------------------${NC}"
#fi
if [ "${STEAM_USER}" == "" ]; then
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
echo -e "${YELLOW}Steam user is not set. ${NC}"
echo -e "${YELLOW}Using anonymous user.${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
STEAM_USER=anonymous
STEAM_PASS=""
STEAM_AUTH=""
else
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
echo -e "${YELLOW}user set to ${STEAM_USER} ${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
fi

## if auto_update is not set or to 1 update
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server
if [ ! -z ${STEAM_APPID} ]; then
DepotDownloader -dir $HOME $( [[ -z ${STEAM_USER} ]] || printf %s "-username ${STEAM_USER} -password ${STEAM_PASS} -remember-password" ) $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '-os windows' ) -app ${STEAM_APPID} $( [[ -z ${STEAM_BETAID} ]] || printf %s "-beta ${STEAM_BETAID}" ) $( [[ -z ${STEAM_BETAPASS} ]] || printf %s "-betapassword ${STEAM_BETAPASS}" ) $( [[ "${STEAM_VALIDATE}" == "1" ]] && printf %s '-validate' )
else
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
echo -e "${YELLOW}No appid set. Starting Server${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
fi

if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
DepotDownloader -dir /home/container $( [[ -z ${STEAM_USER} ]] || printf %s "-username ${STEAM_USER} -password ${STEAM_PASS} -remember-password" ) $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '-os windows' ) -app ${STEAM_APPID} $( [[ -z ${STEAM_BETAID} ]] || printf %s "-beta ${STEAM_BETAID}" ) $( [[ -z ${STEAM_BETAPASS} ]] || printf %s "-betapassword ${STEAM_BETAPASS}" ) $( [[ "${STEAM_VALIDATE}" == "1" ]] && printf %s '-validate' )
DepotDownloader -dir /home/container -app 1007
else
echo -e "${BLUE}---------------------------------------------------------------${NC}"
echo -e "${YELLOW}Not updating game server as auto update was set to 0. Starting Server${NC}"
echo -e "${BLUE}---------------------------------------------------------------${NC}"
fi

chmod +x /home/container/7DaysToDieServer.x86_64

# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
Expand Down
14 changes: 0 additions & 14 deletions depotdl/sources.list

This file was deleted.

11 changes: 5 additions & 6 deletions depotdl/wine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ FROM debian:bookworm-slim

LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.licenses=AGPL

## install required packages
ARG DEBIAN_FRONTEND=noninteractive
COPY sources.list /etc/apt/sources.list
RUN dpkg --add-architecture i386
RUN apt update
RUN apt -y upgrade
Expand Down Expand Up @@ -67,7 +66,7 @@ RUN apt install -y --no-install-recommends \
libunwind8 \
libz-dev \
libzip4

RUN rm -rf /var/lib/apt/lists/*

# Install wine and with recommends
Expand Down Expand Up @@ -104,8 +103,8 @@ ENV DISPLAY_DEPTH=16
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LANG en_US.UTF-8

Check warning on line 106 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 106 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 107 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 107 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 108 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 108 in depotdl/wine/Dockerfile

View workflow job for this annotation

GitHub Actions / depotdl:wine

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
Expand All @@ -120,4 +119,4 @@ STOPSIGNAL SIGINT
COPY --chown=container:container ../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]
CMD ["/entrypoint.sh"]
8 changes: 4 additions & 4 deletions wine/staging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM debian:bookworm-slim

LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.licenses=AGPL

## install required packages
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -68,7 +68,7 @@ RUN apt install -y --no-install-recommends \
libunwind8 \
libz-dev \
libzip4

RUN rm -rf /var/lib/apt/lists/*

# Install wine and with recommends
Expand Down Expand Up @@ -100,8 +100,8 @@ ENV DISPLAY_DEPTH=16
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LANG en_US.UTF-8

Check warning on line 103 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 103 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 104 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 104 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 105 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 105 in wine/staging/Dockerfile

View workflow job for this annotation

GitHub Actions / wine:staging

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN bash -c 'echo "vm.max_map_count = 16777216" > /etc/sysctl.d/20-max_map_count.conf'
Expand Down

0 comments on commit 14188ab

Please sign in to comment.