# mbeddr.build.docker

This repository contains the source code for the docker images used to build mbeddr and other MPS based projects.
It is basically a teamcity build agent with some additional packages for compiling.

Using the image is fairly simple:

```
docker pull mbeddr/mbeddr.build.docker
docker run --name buildAgent1 -d --restart=always -e AGENT_NAME=awesomeAgent mbeddr/mbeddr.build.docker
```

If you run docker on a storage backend that supports size limits for the volumes it makes sense to limit the available disk space for the agent:

```
docker pull mbeddr/mbeddr.build.docker
docker run --name buildAgent1 -d --restart=always --storage-opt size=50G -e AGENT_NAME=awesomeAgent mbeddr/mbeddr.build.docker
```


The agent gets its name from the environment variable `AGENT_NAME`. This name will showup in the teamcity web ui. If you don't set
the name you will endup with a agent called `placeholder`.

# JDK selection

By default, the openjdk 8 will be used. Set env vars `PATH` and `JAVA_HOME` to select a jetbrains jdk:

```
# for jetbrains java 8
export JAVA_HOME="/usr/lib/jvm/${JB_JAVA8_VERSION}/" PATH="/usr/lib/jvm/${JB_JAVA8_VERSION}/bin:$PATH"

# for jetbrains java 11
export JAVA_HOME="/usr/lib/jvm/${JB_JAVA11_VERSION}/" PATH="/usr/lib/jvm/${JB_JAVA11_VERSION}/bin:$PATH"
```

# mbeddr.build.docker

This repository contains the source code for the docker images used to build mbeddr and other MPS based projects.
It is basically a teamcity build agent with some additional packages for compiling.

Using the image is fairly simple:

```
docker pull mbeddr/mbeddr.build.docker
docker run --name buildAgent1 -d --restart=always -e AGENT_NAME=awesomeAgent mbeddr/mbeddr.build.docker
```

If you run docker on a storage backend that supports size limits for the volumes it makes sense to limit the available disk space for the agent:

```
docker pull mbeddr/mbeddr.build.docker
docker run --name buildAgent1 -d --restart=always --storage-opt size=50G -e AGENT_NAME=awesomeAgent mbeddr/mbeddr.build.docker
```


The agent gets its name from the environment variable `AGENT_NAME`. This name will showup in the teamcity web ui. If you don't set
the name you will endup with a agent called `placeholder`.

# JDK selection

By default, the openjdk 8 will be used. Set env vars `PATH` and `JAVA_HOME` to select a jetbrains jdk:

```
# for jetbrains java 8
export JAVA_HOME=$JB_JAVA8_HOME PATH="${JB_JAVA8_HOME}/bin:$PATH"

# for jetbrains java 11
export JAVA_HOME=$JB_JAVA11_HOME PATH="${JB_JAVA11_HOME}/bin:$PATH"
```

Use $JB_JAVAX_HOME in favor of JB_JAVAX_VERSION
readme: Use $JB_JAVAX_HOME in favor of JB_JAVAX_VERSION