Commit 9d3ab1c2 authored by Markus Georg Bendel's avatar Markus Georg Bendel

Add docker image and dockerfile

parent 63f3ab4b
Pipeline #145583 passed with stage
in 1 minute and 43 seconds
......@@ -13,11 +13,27 @@ Installing boost 1.65 on ubuntu:
```bash
sudo apt-get install libboost-system1.65-dev libboost-thread1.65-dev libboost-log1.65-dev
```
Build vsomeip from vsomeip main directory:
```bash
mkdir build
cd build
sudo cmake ..
sudo make
sudo make install
```
If build fails, try to apply this fix:
https://github.com/GENIVI/vsomeip/issues/25
Summary of the fix:
Replace "return &sockaddr;" with "return reinterpret_cast<struct sockaddr*>(&sockaddr);" in:
implementation/endpoints/include/netlink_connector.hpp
Replace "return &sockaddr;" with "return reinterpret_cast<struct sockaddr*>(&sockaddr);"
in: implementation/endpoints/include/netlink_connector.hpp
#### Build the documentation:
To build the documentation asciidoc, source-highlight, doxygen and graphviz is needed:
```bash
sudo apt-get install asciidoc source-highlight doxygen graphviz
make doc
'''
Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
# Use an official Python runtime as a parent image
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install build-essential
RUN apt-get -y install cmake
RUN apt-get -y install libboost-system1.58-dev libboost-thread1.58-dev libboost-log1.58-dev
RUN mkdir /usr/src/emam2someip
# Set the working directory to /emam2someip
WORKDIR /usr/src/emam2someip
# Copy the current directory contents into the container at /emam2someip
COPY . /usr/src/emam2someip
RUN mkdir /usr/src/emam2someip/build
WORKDIR /usr/src/emam2someip/build
RUN cmake ..
RUN make
RUN make install
This diff is collapsed.
This license applies to all files in directory implementation/helper/boost:
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
### vsomeip
##### Copyright
Copyright (C) 2015-2017, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
##### License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
##### vsomeip Overview
----------------
The vsomeip stack implements the http://some-ip.com/ (Scalable service-Oriented
MiddlewarE over IP (SOME/IP)) protocol. The stack consists out of:
* a shared library for SOME/IP (`libvsomeip.so`)
* a second shared library for SOME/IP's service discovery (`libvsomeip-sd.so`)
which is loaded during runtime if the service discovery is enabled.
##### Build Instructions
###### Dependencies
- A C++11 enabled compiler like gcc >= 4.8 is needed.
- vsomeip uses CMake as buildsystem.
- vsomeip uses Boost >= 1.55:
Ubuntu 14.04:
`sudo apt-get install libboost-system1.55-dev libboost-thread1.55-dev libboost-log1.55-dev`
Ubuntu 12.04: a PPA is necessary to use version 1.54 of Boost:
-- URL: https://launchpad.net/~boost-latest/+archive/ubuntu/ppa
--`sudo add-apt-repository ppa:boost-latest/ppa`
--`sudo apt-get install libboost-system1.55-dev libboost-thread1.55-dev
libboost-log1.55-dev`
For the tests Google's test framework https://code.google.com/p/googletest/[gtest] in version 1.7.0 is needed.
-- URL: https://googletest.googlecode.com/files/gtest-1.7.0.zip
To build the documentation asciidoc, source-highlight, doxygen and graphviz is needed:
--`sudo apt-get install asciidoc source-highlight doxygen graphviz`
###### Compilation
For compilation call:
```bash
mkdir build
cd build
cmake ..
make
```
To specify a installation directory (like `--prefix=` if you're used to autotools) call cmake like:
```bash
cmake -DCMAKE_INSTALL_PREFIX:PATH=$YOUR_PATH ..
make
make install
```
###### Compilation with predefined unicast and/or diagnosis address
To predefine the unicast address, call cmake like:
```bash
cmake -DUNICAST_ADDRESS=<YOUR IP ADDRESS> ..
```
To predefine the diagnosis address, call cmake like:
```bash
cmake -DDIAGNOSIS_ADDRESS=<YOUR DIAGNOSIS ADDRESS> ..
```
The diagnosis address is a single byte value.
###### Compilation with signal handling
To compile vsomeip with signal handling (SIGINT/SIGTERM) enabled, call cmake like:
```bash
cmake -DENABLE_SIGNAL_HANDLING=1 ..
```
In the default setting, the application has to take care of shutting down vsomeip in case these signals are received.
{
"unicast" : "10.0.3.1",
"logging" :
{
"level" : "info",
"console" : "true",
"file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "service-sample",
"id" : "0x1277"
},
{
"name" : "client-sample",
"id" : "0x1344"
}
],
"security" :
{
"check_credentials" : "true",
"policies" :
[
{
"client" : "0x1277",
"credentials" : { "uid" : "1000", "gid" : "1000" },
"allow" :
{
"offers":
[
{
"service" : "0x1234",
"instance" : "0x5678"
},
{
"service" : "0x1235",
"instance" : "0x5678"
}
]
}
},
{
"client" : "0x1344",
"credentials" : { "uid" : "1000", "gid" : "1000" },
"allow" :
{
"requests":
[
{
"service" : "0x1234",
"instance" : "0x5678"
}
]
}
}
]
},
"routing" : "service-sample",
"service-discovery" :
{
"enable" : "true",
"multicast" : "224.244.224.245",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "3",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
{
"unicast" : "192.168.56.101",
"netmask" : "255.255.255.0",
"logging" :
{
"level" : "info",
"console" : "true",
"file" : { "enable" : "true", "path" : "/var/log/vsomeip.log" },
"dlt" : "true"
},
"applications" :
[
{
"name" : "client-sample",
"id" : "0x1343"
},
{
"name" : "second-client-sample",
"id" : "0x1344"
},
{
"name" : "third-client-sample",
"id" : "0x1345"
},
{
"name" : "fourth-client-sample",
"id" : "0x1346"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unicast" : "192.168.56.102",
"reliable" : { "port" : "30509", "magic-cookies" : false },
"events" :
[
{
"event" : "0x0777",
"is_field" : "true"
},
{
"event" : "0x0778",
"is_field" : "false"
},
{
"event" : "0x0779",
"is_field" : "true"
}
],
"eventgroups" :
[
{
"eventgroup" : "0x4455",
"events" : [ "0x777", "0x778" ]
},
{
"eventgroup" : "0x4465",
"events" : [ "0x778", "0x779" ]
},
{
"eventgroup" : "0x4555",
"events" : [ "0x777", "0x779" ]
}
]
}
],
"routing" : "client-sample",
"service-discovery" :
{
"enable" : "true",
"multicast" : "224.0.0.1",
"port" : "30491",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "3",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
{
"unicast" : "192.168.56.102",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "service-sample",
"id" : "0x1277"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "magic-cookies" : "false" },
"events" :
[
{
"event" : "0x0777",
"is_field" : "false",
"is_reliable" : "true",
"update-cycle" : 2000
},
{
"event" : "0x0778",
"is_field" : "true",
"is_reliable" : "true",
"update-cycle" : 0
},
{
"event" : "0x0779",
"is_field" : "false",
"is_reliable" : "true"
}
],
"eventgroups" :
[