You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2021/01/31 11:20:50 UTC

[plc4x] 38/45: - Fixed the Docker build on Windows systems

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/plc4c
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit cbfb17bfa8aec52a411e03af0ff58081657b6ea3
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Jan 26 14:31:18 2021 +0100

    - Fixed the Docker build on Windows systems
---
 Dockerfile | 8 +++++++-
 README.md  | 6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 94ae4c6..3abe6b5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -63,6 +63,9 @@ RUN apt install -y bison flex gcc g++
 # Required for "with-python" profile
 RUN apt install -y python-setuptools python
 
+# Required for running on Windows systems
+RUN apt install -y dos2unix
+
 # Copy the project into the docker container
 COPY . /ws/
 
@@ -71,6 +74,9 @@ WORKDIR /ws
 
 # Make the maven wrapper script executalbe (needed when running on Windows)
 RUN chmod +x ./mvnw
+# Change the line endint to unix-style (needed when running on Windows)
+RUN dos2unix ./mvnw
+RUN dos2unix .mvn/wrapper/maven-wrapper.properties
 
 # Tell Maven to fetch all needed dependencies first, so they can get cached
 # (Tried a patched version of the plugin to allow exclusion of inner artifacts.
@@ -78,7 +84,7 @@ RUN chmod +x ./mvnw
 RUN ./mvnw -P with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-logstash,with-python,with-sandbox com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline -DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox
 
 # Build everything with all tests
-RUN ./mvnw -P with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-logstash,with-python,with-sandbox install
+RUN ./mvnw -P skip-prerequisite-check,with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-logstash,with-python,with-sandbox install
 
 # Get the version of the project and save it in a local file on the container
 RUN ./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -DforceStdout -q -pl . > project_version
diff --git a/README.md b/README.md
index d7a1a06..d376ec1 100644
--- a/README.md
+++ b/README.md
@@ -193,8 +193,6 @@ Make sure the `bin` directories of containing the executables `mingw32-make.exe`
 
 ### Building with Docker
 
-WARNING: Currently the Docker build seems to be not working so please have patience till we fixed the issues.
-
 If you don't want to bother setting up the environment on your normal system and you have Docker installed, you can also build everything in a Docker container:
 
 ```
@@ -225,6 +223,8 @@ The `Go` drivers can be built by enabling the `with-go` profile:
 mvn -P with-go install  # add -DskipTests to omit running the tests
 ```
 
+NOTE: The C++ build is considered experimental and currently not working properly.
+
 The `C++` drivers are still under development and still not really usable. 
 Therefore, they are located in the so-called `sandbox`. 
 If you want to build them, this has to be enabled by activating the `with-sandbox` and `with-cpp` maven profiles:
@@ -250,7 +250,7 @@ mvn -P with-sandbox,with-python,with-proxies install  # add -DskipTests to omit
 In order to build everything the following command should work:
 
 ```
-mvn -P with-go,with-boost,with-cpp,with-dotnet,with-logstash,with-proxies,with-python,with-sandbox install
+mvn -P with-go,with-boost,with-dotnet,with-logstash,with-proxies,with-python,with-sandbox install
 ```
 
 ## Community