Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Transition repo to multi-stage builds CM2Walki/steamcmd#45 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
CM2Walki authored Oct 23, 2022
1 parent 1e325c1 commit e770e8a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![](https://img.shields.io/codacy/grade/1a72f69b97bc46cfaec6cb77819beb66)](https://hub.docker.com/r/cm2network/csgo/) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/cm2network/csgo)](https://hub.docker.com/r/cm2network/csgo/) [![Docker Stars](https://img.shields.io/docker/stars/cm2network/csgo.svg)](https://hub.docker.com/r/cm2network/csgo/) [![Docker Pulls](https://img.shields.io/docker/pulls/cm2network/csgo.svg)](https://hub.docker.com/r/cm2network/csgo/) [![](https://img.shields.io/docker/image-size/cm2network/csgo)](https://img.shields.io/docker/image-size/cm2network/csgo) [![Discord](https://img.shields.io/discord/747067734029893653)](https://discord.gg/7ntmAwM)
# Supported tags and respective `Dockerfile` links
- [`base`, `latest` (*bullseye/Dockerfile*)](https://github.com/CM2Walki/CSGO/blob/master/bullseye/Dockerfile)
- [`metamod` (*bullseye-metamod/Dockerfile*)](https://github.com/CM2Walki/CSGO/blob/master/bullseye-metamod/Dockerfile)
- [`sourcemod` (*bullseye-sourcemod/Dockerfile*)](https://github.com/CM2Walki/CSGO/blob/master/bullseye-sourcemod/Dockerfile)
- [`metamod` (*bullseye/Dockerfile*)](https://github.com/CM2Walki/CSGO/blob/master/bullseye/Dockerfile)
- [`sourcemod` (*bullseye/Dockerfile*)](https://github.com/CM2Walki/CSGO/blob/master/bullseye/Dockerfile)

# What is Counter-Strike: Global Offensive?
Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago. CS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).
Expand Down
5 changes: 0 additions & 5 deletions bullseye-metamod/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions bullseye-sourcemod/Dockerfile

This file was deleted.

14 changes: 12 additions & 2 deletions bullseye/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###########################################################
# Dockerfile that builds a CSGO Gameserver
###########################################################
FROM cm2network/steamcmd:root
FROM cm2network/steamcmd:root as build_stage

LABEL maintainer="walentinlamonos@gmail.com"

Expand All @@ -16,7 +16,7 @@ RUN set -x \
&& apt-get install -y --no-install-recommends --no-install-suggests \
wget=1.21-1+deb11u1 \
ca-certificates=20210119 \
lib32z1=1:1.2.11.dfsg-2+deb11u1 \
lib32z1=1:1.2.11.dfsg-2+deb11u2 \
&& mkdir -p "${STEAMAPPDIR}" \
# Add entry script
&& wget --max-redirect=30 "${DLURL}/master/etc/entry.sh" -O "${HOMEDIR}/entry.sh" \
Expand All @@ -33,6 +33,8 @@ RUN set -x \
# Clean up
&& rm -rf /var/lib/apt/lists/*

FROM build_stage AS bullseye-base

ENV SRCDS_FPSMAX=300 \
SRCDS_TICKRATE=128 \
SRCDS_PORT=27015 \
Expand Down Expand Up @@ -67,3 +69,11 @@ CMD ["bash", "entry.sh"]
EXPOSE 27015/tcp \
27015/udp \
27020/udp

FROM bullseye-base AS bullseye-metamod

ENV METAMOD_VERSION 1.11

FROM bullseye-metamod AS bullseye-sourcemod

ENV SOURCEMOD_VERSION 1.11
6 changes: 6 additions & 0 deletions bullseye/hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
BUILD_PATH=$(echo ${DOCKERFILE_PATH}| sed 's#/#..#g' | sed 's#[a-zA-Z0-9]\+#/#g' | cut -c 2- )

docker build --target=bullseye-base -f $(basename ${DOCKERFILE_PATH}) -t $DOCKER_REPO:latest -t $DOCKER_REPO:base ${BUILD_PATH}.
docker build --target=bullseye-metamod -f $(basename ${DOCKERFILE_PATH}) -t $DOCKER_REPO:metamod ${BUILD_PATH}.
docker build --target=bullseye-sourcemod -f $(basename ${DOCKERFILE_PATH}) -t $DOCKER_REPO:sourcemod ${BUILD_PATH}.
2 changes: 2 additions & 0 deletions bullseye/hooks/push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
docker push --all-tags ${DOCKER_REPO}

0 comments on commit e770e8a

Please sign in to comment.