Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# MultiApp Dockerfile
# A GTKmm 4.0 application with WebKitGTK browser

FROM debian:bookworm-slim

# Set environment variables for non-interactive apt
ENV DEBIAN_FRONTEND=noninteractive

# Install base dependencies, build tools, GTKmm 4.0, WebKitGTK 6.0, and X11 forwarding
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential \
pkg-config \
make \
g++ \
libgtkmm-4.0-dev \
libwebkitgtk-6.0-dev \
libasio-dev \
libgtest-dev \
libx11-dev \
fonts-dejavu-core \
fonts-font-awesome \
fontconfig \
locales \
librsvg2-common \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 en_US.UTF-8

# Set locale
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

# Set working directory
WORKDIR /app

# Copy source files
COPY . /app/

# Build the application
RUN make clean || true
RUN make

# Set display environment variable for X11 forwarding
ENV DISPLAY=:0

# Default command - run the application
CMD ["./multiapp.exe"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ In the future it should have apps that work using SQL, SDL and even web requests
- [Roadmap](#️-roadmap)
- [Requirements](#️-requirements)
- [Build and Run](#-build-and-run)
- [Docker](#-docker)
- [Screenshots](#-screenshots)

## 🧬 Project Structure
Expand Down Expand Up @@ -50,12 +51,14 @@ In Arch based OS:
- gtkmm-4.0
- webkitgtk-6.0
- asio
- gtest

In Ubuntu/Debian based OS:

- libgtkmm-4.0-dev
- libwebkitgtk-6.0-dev
- libasio-dev
- libgtest-dev

## 🔨 Build and run

Expand All @@ -71,6 +74,19 @@ For cleaning building objects and executables, run:
``` make clean ```
It removes the build/, build_tests/, multiapp.exe and multiapp_tests.exe folders and files.

### 🐋 Docker

You can also run with docker!
Just run to create a local image

And then run the container using:

- Linux: Run ``` xhost +local:docker ``` create the image using ```sudo docker build -t multiapp .``` and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp```

- Windows: Use ```sudo docker build -t multiapp .``` and run with ``` docker run -it -e DISPLAY=$DISPLAY --network host -v /mnt/host/wslg/.X11-unix:/tmp/.X11-unix -v /mnt/host/wslg:/mnt/host/wslg multiapp ```

- Mac: ``` Use xquartz to allow the connection ```, then run ``` xhost +local:docker ``` finally create the image using ```sudo docker build -t multiapp .``` and run with ```sudo docker run -it --rm -e DISPLAY=$DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix multiapp```

## 📷 Screenshots

Here are some screenshots of the funtioning app on Linux.
Expand Down