# Copyright Bosch.IO GmbH 1997, 2020
# All rights reserved, also regarding any disposal, exploitation,
# reproduction, editing, distribution, as well as in the event of
# applications for industrial property rights.
#
# This software is the confidential and proprietary information
# of Bosch.IO GmbH. You shall not disclose
# such Confidential Information and shall use it only in
# accordance with the terms of the license agreement you
# entered into with Bosch.IO GmbH.

# Dockerfile for parametrized build
# Examples:
# Build over default base image and OS architecture (default arch is the one on the build machine):
# docker build -t <image-name> .
#
# Build over specific base image
# docker build -t <image-name> --build-arg FROM_IMAGE=openjdk:8-slim .
#
# Build over specific base image and architecture (e.g. arm32v7)
# docker build -t <image-name> --build-arg FROM_IMAGE=arm32v7/openjdk:8-slim .

# Default base image if no build arguments are specified
ARG FROM_IMAGE=openjdk:8-slim

FROM $FROM_IMAGE

RUN apt-get update && apt-get install -y libglib2.0-dev

ADD osgi /osgi/

WORKDIR /osgi/bin/vms/jdk

ENTRYPOINT ["sh", "server.sh", "exec"]

STOPSIGNAL SIGINT
