Merge pull request #149 from 01e9/master

Replaced outdated docker/ with script in readme
This commit is contained in:
Joey de Vries
2019-12-15 15:21:09 +01:00
committed by GitHub
4 changed files with 6 additions and 48 deletions

View File

@@ -19,6 +19,12 @@ Note that CodeBlocks or other IDEs may have issues running the programs due to p
Running `ls $LOGL_ROOT_PATH` should list, among other things, this README file and the resources direcory.
### Linux building in Docker
Using [this project](https://github.com/01e9/docker-ide) you can start IDE in docker:
```
.../docker-ide/ide cpp-gpu ~/.../clion/bin/clion.sh -x11docker "--gpu"
```
## Mac OS X building
Building on Mac OS X is fairly simple (thanks [@hyperknot](https://github.com/hyperknot)):
```

View File

@@ -1,2 +0,0 @@
**
!Dockerfile

View File

@@ -1,18 +0,0 @@
FROM ubuntu:18.04
ARG TINI_VERSION='0.18.0'
RUN apt-get update \
&& apt-get install -y \
libgtk2.0-0 libcanberra-gtk-module libxext-dev libxrender-dev libxtst-dev libxslt-dev dmz-cursor-theme \
build-essential cmake git \
libglfw3-dev libassimp-dev libxinerama-dev libxcursor-dev mesa-utils mesa-utils-extra kmod \
wget htop zip unzip nano \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
CMD ["sleep", "infinity"]

View File

@@ -1,28 +0,0 @@
#!/bin/bash
[ -n "$(which x11docker)" ] \
|| { echo "x11docker is required https://github.com/mviereck/x11docker"; exit 1; }
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
PROJECT_DIR=$(dirname ${SCRIPT_DIR})
CMD=${@}
[ -n "${CMD}" ] \
|| { echo "Command is required"; exit 1; }
IMAGE=learnopengl
[ -n "$(docker images -q --filter=reference="${IMAGE}")" ] \
|| docker build -t ${IMAGE} ${SCRIPT_DIR}
x11docker \
--gpu \
--hostdisplay \
--homedir ${HOME} \
--clipboard \
--stdout --stderr \
--cap-default \
--workdir ${PROJECT_DIR} \
-- "--cap-add=SYS_PTRACE" \
${IMAGE} \
${CMD}