Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Docker build #296

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
55 changes: 55 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "compile with debug in docker",
"type": "shell",
"command": "mkdir -p ${workspaceFolder}/build; docker run --rm --privileged -v ${workspaceFolder}:/root/MrsWatson mrswatson_docker:latest bash -c \"cd ~/MrsWatson/build; cmake -D CMAKE_BUILD_TYPE=Debug .. && make\"",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "build a docker image",
"type": "shell",
"command": "docker build --pull --rm -f \"Dockerfile\" -t mrswatson_docker:latest \".\"",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
2 changes: 2 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ building on Linux should be a simple matter of:
make
make install

There is a Dockerfile in the root directory that you can use to build a linux image with all necessary tools installed. If you use VSCode, in .vscode directory there are pre-configured tasks for building the image and both 32 and 64-bit linux versions of the application in a container.


[homebrew]: http://brew.sh
[cmake]: http://www.cmake.org/download/
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y gcc g++ gdb gdbserver make cmake g++-multilib libc6-dev libc6-dev-i386 libx11-dev
RUN echo "set auto-load safe-path /" >> /root/.gdbinit
2 changes: 2 additions & 0 deletions test/unit/ApplicationRunner.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
#include <stdio.h>

static const char *kApplicationRunnerOutputFolder = "out";
#if WINDOWS
static const int kApplicationRunnerWaitTimeoutInMs = 1000;
#endif

CharString buildTestArgumentString(const char *arguments, ...) {
CharString formattedArguments;
Expand Down