Skip to content

Commit

Permalink
Include Vulkan SDK and ability to select build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fpiesche committed Oct 31, 2022
1 parent f660734 commit 57fe4a3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
28 changes: 23 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
FROM ubuntu:focal AS build
FROM ubuntu:focal AS rbdoom3bfg-buildenv
ENV DEBIAN_FRONTEND=noninteractive

ENV DEBIAN_FRONTEND noninteractive
# Add the Vulkan SDK repository
RUN apt-get update \
&& apt-get install -y curl gpg\
&& curl -Lso /tmp/lunarg-signing-key-pub.asc \
http://packages.lunarg.com/lunarg-signing-key-pub.asc \
&& apt-key add /tmp/lunarg-signing-key-pub.asc \
&& curl -Lso /etc/apt/sources.list.d/lunarg-vulkan-focal.list \
http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list

ADD . /workspace
# Install the general RBDoom3BFG dependencies
RUN apt-get update \
&& apt-get install -y \
build-essential git cmake \
libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
libsdl2-dev libopenal-dev vulkan-sdk \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev

# From the previous build environment stage, actually run the build
FROM rbdoom3bfg-buildenv AS build

ARG CONFIGSCRIPT=cmake-eclipse-linux-profile.sh
ENV CONFIGSCRIPT=${CONFIGSCRIPT}

ADD . /workspace
WORKDIR /workspace
RUN cd neo && ./cmake-eclipse-linux-profile.sh
RUN cd neo && ./${CONFIGSCRIPT}
RUN cd build && make

# Copy only the finished RBDoom3BFG executable to an empty image
# for use with docker build --output
FROM scratch AS export
COPY --from=build /workspace/build/RBDoom3BFG /workspace/base/maps/ /
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ If your system has Docker installed, you can create RBDOOM3BFG builds without ha

> docker build . --output type=local,dest=./build

This will run a build and save the resulting executables to `./build` on your host machine.
This will run a build and save the resulting executables to `./build` on your host machine. By default, this will create a build using the `eclipse-linux-profile` configuration; to customize this you can also pass in the `CONFIGSCRIPT` build argument. For example, to create a build using the Vulkan release configuration:

> docker build . --output type=local,dest=./build --build-arg CONFIGSCRIPT=cmake-linux-vulkan-release.sh


## Local build

Expand Down

0 comments on commit 57fe4a3

Please sign in to comment.