Skip to content

Commit

Permalink
add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotacg committed Jan 24, 2024
1 parent ac1f845 commit b147857
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
FROM ubuntu:22.04

RUN apt update;\
apt install --yes software-properties-common; \
apt update
RUN DEBIAN_FRONTEND=noninteractive apt install --yes \
autoconf \
automake \
bison \
build-essential \
ccache \
clang-15 \
freeglut3-dev \
libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libcpptest-dev \
libcurl4-openssl-dev \
libfreetype6-dev \
libgif-dev \
libgsf-1-dev \
libjpeg-dev \
liblua5.2-dev \
libluabind-dev \
liblzma-dev \
libmysqlclient-dev \
libogg-dev \
libopenal-dev \
libpng-dev \
libpostproc-dev \
libsquish-dev \
libssl-dev \
libswscale-dev \
libvorbis-dev \
libxml2-dev \
mingw-w64 \
mingw-w64-tools \
ninja-build \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
libqtpropertybrowser-dev \
qt6-base-dev \
qt6-l10n-tools \
qt6-tools-dev \
qt6-tools-dev-tools


RUN apt install --yes \
doxygen \
gdb \
git \
graphviz \
libxrandr-dev \
wget

# work arround as there is no debug version available
RUN cp /lib/x86_64-linux-gnu/libcpptest.so /lib/x86_64-linux-gnu/libcpptestd.so

RUN wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
&& mkdir --parents "$CMAKE_INSTALL_DIR" \
&& sh /tmp/cmake.sh --skip-license --prefix="$CMAKE_INSTALL_DIR" \
&& ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/cmake" /usr/local/bin/cmake

ARG CMAKE_VERSION=3.27.9
ARG CMAKE_INSTALL_DIR=/opt/cmake-$CMAKE_VERSION
ARG USERNAME=ryzom
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install --yes sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

USER $USERNAME
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"build": {
"dockerfile": "Dockerfile"
},
"containerUser": "ryzom",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack"
],
"settings": {
"cmake.configureArgs": [
"-DWITH_STATIC=ON",
"-DWITH_NEL_TESTS=OFF",
"-DWITH_NEL_SAMPLES=ON",
"-DWITH_LUA51=OFF",
"-DWITH_LUA52=ON",
"-DWITH_RYZOM=ON",
"-DWITH_RYZOM_SERVER=ON",
"-DWITH_RYZOM_CLIENT=ON",
"-DWITH_RYZOM_TOOLS=ON",
"-DWITH_NEL_TOOLS=ON",
"-DWITH_NELNS=ON",
"-DWITH_NELNS_LOGIN_SYSTEM=ON",
"-DWITH_NELNS_SERVER=ON",
"-DWITH_QT5=ON",
"-DWITH_LIBGSF=ON",
"-DWITH_MONGODB=OFF",
"-DWITH_PCH=OFF"
]
}
}
}
}
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
devcontainer:
image: "ryzomcore/devcontainer"
build: ./.devcontainer

0 comments on commit b147857

Please sign in to comment.