Skip to content

Commit

Permalink
added gosu-amd64 binary
Browse files Browse the repository at this point in the history
  • Loading branch information
jammsen committed Feb 21, 2024
1 parent ed9c3a4 commit 1c1062c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ RUN curl -fsSLO "$GORCON_RCONCLI_URL" \
&& rm -Rf "$GORCON_RCONCLI_DIR" \
&& go build -v ./cmd/gorcon

FROM debian:bookworm-slim as gosuverify
# FROM debian:bookworm-slim as gosuverify

# Latest releases available at https://github.com/tianon/gosu/releases
ENV GOSU_URL=https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64 \
GOSU_BINARY_FILENAME=gosu-amd64 \
GOSU_BINARY_SHA1SUM=9a17525a1c21e57f3a074768c53f0f676a85ea3a \
GOSU_ASC_URL=https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64.asc \
GOSU_ASC_FILENAME=gosu-amd64.asc \
GOSU_ASC_SHA1SUM=6a44cbe21a12d47424a43873ca955994a39dc23e

RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests ca-certificates curl gnupg \
&& apt-get autoremove -y --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& curl -fsSLO "$GOSU_URL" \
&& echo "${GOSU_BINARY_SHA1SUM} ${GOSU_BINARY_FILENAME}" | sha1sum -c - \
&& curl -fsSLO "$GOSU_ASC_URL" \
&& echo "${GOSU_ASC_SHA1SUM} ${GOSU_ASC_FILENAME}" | sha1sum -c - \
&& gpg --batch --verify gosu-amd64.asc gosu-amd64 \
&& chmod +x "$GOSU_BINARY_FILENAME" \
&& mv "$GOSU_BINARY_FILENAME" "/usr/local/bin/$GOSU_BINARY_FILENAME" \
&& ln -s "/usr/local/bin/${GOSU_BINARY_FILENAME}" /usr/local/bin/gosu \
&& rm -Rf "$GOSU_ASC_FILENAME" \
&& gosu --version \
&& gosu nobody true
# ENV GOSU_URL=https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64 \
# GOSU_BINARY_FILENAME=gosu-amd64 \
# GOSU_BINARY_SHA1SUM=9a17525a1c21e57f3a074768c53f0f676a85ea3a \
# GOSU_ASC_URL=https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64.asc \
# GOSU_ASC_FILENAME=gosu-amd64.asc \
# GOSU_ASC_SHA1SUM=6a44cbe21a12d47424a43873ca955994a39dc23e

# RUN apt-get update \
# && apt-get install -y --no-install-recommends --no-install-suggests ca-certificates curl gnupg \
# && apt-get autoremove -y --purge \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
# && curl -fsSLO "$GOSU_URL" \
# && echo "${GOSU_BINARY_SHA1SUM} ${GOSU_BINARY_FILENAME}" | sha1sum -c - \
# && curl -fsSLO "$GOSU_ASC_URL" \
# && echo "${GOSU_ASC_SHA1SUM} ${GOSU_ASC_FILENAME}" | sha1sum -c - \
# && gpg --batch --verify gosu-amd64.asc gosu-amd64 \
# && chmod +x "$GOSU_BINARY_FILENAME" \
# && mv "$GOSU_BINARY_FILENAME" "/usr/local/bin/$GOSU_BINARY_FILENAME" \
# && ln -s "/usr/local/bin/${GOSU_BINARY_FILENAME}" /usr/local/bin/gosu \
# && rm -Rf "$GOSU_ASC_FILENAME" \
# && gosu --version \
# && gosu nobody true

FROM debian:bookworm-slim as supercronicverify

Expand Down Expand Up @@ -196,7 +196,6 @@ EXPOSE 25575/tcp

# Install minimum required packages for dedicated server
COPY --from=rconclibuilder /build/gorcon /usr/local/bin/rcon
COPY --from=gosuverify /usr/local/bin/gosu /usr/local/bin/gosu
COPY --from=supercronicverify /usr/local/bin/supercronic /usr/local/bin/supercronic

RUN apt-get update \
Expand All @@ -209,11 +208,14 @@ COPY --chmod=755 entrypoint.sh /
COPY --chmod=755 scripts/ /scripts
COPY --chmod=755 includes/ /includes
COPY --chmod=755 configs/rcon.yaml /home/steam/steamcmd/rcon.yaml
COPY --chmod=755 gosu-amd64 /usr/local/bin/gosu

RUN mkdir -p "$BACKUP_PATH" \
&& ln -s /scripts/backupmanager.sh /usr/local/bin/backup \
&& ln -s /scripts/rconcli.sh /usr/local/bin/rconcli \
&& ln -s /scripts/restart.sh /usr/local/bin/restart
&& ln -s /scripts/restart.sh /usr/local/bin/restart \
&& gosu --version \
&& gosu nobody true

VOLUME ["${GAME_ROOT}"]

Expand Down
Binary file added gosu-amd64
Binary file not shown.

0 comments on commit 1c1062c

Please sign in to comment.