Skip to content

Commit

Permalink
Use ubuntu for ddnet++ because musl and libsqlite
Browse files Browse the repository at this point in the history
too lazy to debug that right now
  • Loading branch information
ChillerDragon committed Oct 31, 2023
1 parent 845c1dc commit e44c32a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ jobs:
- name: Getting image tag
id: tag
run: |
echo DDNETPP_TAG="$(grep 'ARG DDNETPP_VERSION=' ddnetpp/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
echo DDNET_SIMPLE_TAG="$(grep 'ARG DDNET_VERSION=' ddnet-simple/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
echo DDNET_MYSQL_TAG="$(grep 'ARG DDNET_VERSION=' ddnet-mysql/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Publish ddnetpp
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ddnetpp
push: true
tags: |
docker.io/chillerdragon/ddnetpp:${{ steps.tag.outputs.DDNETPP_TAG }}
docker.io/chillerdragon/ddnetpp:latest
- name: Publish ddnet-simple
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
Expand All @@ -43,4 +53,4 @@ jobs:
push: true
tags: |
docker.io/chillerdragon/ddnet-mysql:${{ steps.tag.outputs.DDNET_MYSQL_TAG }}
docker.io/chillerdragon/ddnet-mysql:latest
docker.io/chillerdragon/ddnet-mysql:latest
17 changes: 11 additions & 6 deletions ddnetpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM alpine:3.18.2
FROM ubuntu:23.04

ARG DDNETPP_VERSION=v0.1.0

WORKDIR /ddnetpp

RUN apk add cmake make g++ libpng-dev rust cargo sqlite-dev curl-dev python3
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install pkg-config cmake ninja-build libsqlite3-dev build-essential git libssl-dev cargo rustc python3 -y
RUN apt-get install wget unzip libcurl4-openssl-dev libpng-dev -y

RUN wget -O ddnetpp.zip https://github.com/DDNetPP/DDNetPP/archive/refs/tags/$DDNETPP_VERSION.zip

Expand All @@ -15,18 +17,21 @@ RUN mv * ddnetpp-src
RUN mkdir ddnetpp-src/build
RUN cd ddnetpp-src/build && cmake .. -DPREFER_BUNDLED_LIBS=ON -DCLIENT=OFF && make -j$(nproc)

FROM alpine:3.18.2
FROM ubuntu:23.04

WORKDIR ddnetpp/

RUN apk add sqlite-dev curl
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install sqlite3 curl -y

COPY --from=0 /ddnetpp/ddnetpp-src/build/DDNet-Server .
COPY --from=0 /ddnetpp/ddnetpp-src/build/DDNetPP .

RUN echo 'sv_map BlmapChill' > autoexec.cfg

RUN mkdir maps

# BlmapChill v0183
RUN wget -O "maps/BlmapChill.map" https://github.com/DDNetPP/maps/raw/52774bedf96151518893c7b665bfe6952ec950ed/BlmapChill.map
RUN curl -L -o "maps/BlmapChill.map" https://github.com/DDNetPP/maps/raw/52774bedf96151518893c7b665bfe6952ec950ed/BlmapChill.map


CMD ["/ddnetpp/DDNetPP"]
Expand Down

0 comments on commit e44c32a

Please sign in to comment.