-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix docker build Fix build after recent Eluna changes Changed base image to Ubuntu 22:04 Switched compiler to clang * Add docker workflow --------- Co-authored-by: PargeLenis <dead.man.walkin@hotmail.de>
- Loading branch information
Showing
3 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Docker Build | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout Submodules | ||
shell: bash | ||
run: | | ||
git submodule init && git submodule update | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build Mangosd Docker image | ||
run: | | ||
docker build -t mangosd:latest -f dockercontainer/DockerFile-mangosd . | ||
- name: Build Realmd Docker image | ||
run: | | ||
docker build -t realmd:latest -f dockercontainer/DockerFile-realmd . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
#Build image | ||
FROM ubuntu:18.04 as build-step | ||
FROM ubuntu:22.04 AS build-step | ||
|
||
RUN apt-get -y update | ||
RUN apt-get -y install curl autoconf automake libbz2-dev libace-dev libssl-dev libmysqlclient-dev libtool build-essential gpg wget lsb-release software-properties-common | ||
ENV TZ=US DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \ | ||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \ | ||
apt-get update | ||
RUN apt-get -y install cmake | ||
RUN apt-get -y update | ||
RUN apt-get -y install curl autoconf automake libbz2-dev libace-dev libssl-dev libmysqlclient-dev libtool \ | ||
build-essential lsb-release software-properties-common cmake libreadline-dev clang | ||
|
||
COPY . /mangoserver | ||
RUN mkdir /mangoserver/build | ||
RUN mkdir /mangoserver/build && cd /mangoserver/build | ||
WORKDIR /mangoserver/build | ||
|
||
#Install mangos | ||
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/mangos -DBUILD_MANGOSD=1 -DBUILD_REALMD=0 -DBUILD_TOOLS=0 | ||
RUN cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/mangos -DBUILD_MANGOSD=1 -DBUILD_REALMD=0 -DBUILD_TOOLS=0 | ||
RUN make -j4 | ||
RUN make install | ||
|
||
#Runtime image | ||
FROM ubuntu:18.04 as runtime | ||
FROM ubuntu:22.04 AS runtime | ||
|
||
ENV TZ=US DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get -y update && apt-get -y upgrade | ||
RUN apt-get -y install libmysqlclient20 openssl | ||
RUN apt-get -y install libmysqlclient-dev openssl lua-readline | ||
|
||
COPY --from=build-step /mangos /mangos | ||
COPY --from=build-step /etc/mangosd.conf.dist ../etc/mangosd.conf.dist | ||
COPY --from=build-step /etc/mangosd.conf.dist /mangos/etc/mangosd.conf.dist | ||
|
||
RUN echo "/mangos/lib" >> /etc/ld.so.conf && ldconfig | ||
|
||
WORKDIR /mangos/bin | ||
RUN chmod +x mangosd | ||
|
||
EXPOSE 8085 | ||
ENTRYPOINT [ "./mangosd" ] | ||
ENTRYPOINT [ "./mangosd","-c","/mangos/etc/mangosd.conf" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
#Build image | ||
FROM ubuntu:18.04 as build-step | ||
FROM ubuntu:22.04 AS build-step | ||
|
||
ENV TZ=US DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get -y update | ||
RUN apt-get -y install curl autoconf automake libbz2-dev libace-dev libssl-dev libmysqlclient-dev libtool build-essential gpg wget | ||
RUN apt-get -y install curl autoconf automake libbz2-dev libace-dev libssl-dev libmysqlclient-dev libtool \ | ||
build-essential lsb-release software-properties-common cmake libreadline-dev clang | ||
|
||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \ | ||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \ | ||
apt-get update | ||
RUN apt-get -y install cmake | ||
|
||
COPY . /mangoserver | ||
RUN mkdir /mangoserver/build | ||
WORKDIR /mangoserver/build | ||
|
||
#Install mangos | ||
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/mangos -DBUILD_MANGOSD=0 -DBUILD_REALMD=1 -DBUILD_TOOLS=0 | ||
RUN cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/mangos -DBUILD_MANGOSD=0 -DBUILD_REALMD=1 -DBUILD_TOOLS=0 | ||
RUN make -j4 | ||
RUN make install | ||
|
||
#Runtime image | ||
FROM ubuntu:18.04 as runtime | ||
FROM ubuntu:22.04 AS runtime | ||
|
||
RUN apt-get -y update && apt-get -y upgrade | ||
RUN apt-get -y install libmysqlclient20 openssl | ||
RUN apt-get -y install libmysqlclient-dev openssl | ||
|
||
COPY --from=build-step /mangos /mangos | ||
COPY --from=build-step /etc/realmd.conf.dist ../etc/realmd.conf.dist | ||
COPY --from=build-step /etc/realmd.conf.dist /mangos/etc/realmd.conf.dist | ||
WORKDIR /mangos/bin | ||
RUN chmod +x realmd | ||
|
||
EXPOSE 3724 | ||
ENTRYPOINT [ "./realmd" ] | ||
ENTRYPOINT [ "./realmd","-c","/mangos/etc/realmd.conf" ] |