-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (41 loc) · 1.76 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#-------------------------------------------------------------------------------
# Copyright (C) 2017 Create-Net / FBK.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Create-Net / FBK - initial API and implementation
#-------------------------------------------------------------------------------
ARG BASEIMAGE_BUILD=agileiot/raspberry-pi3-zulujdk:8-jdk-maven
ARG BASEIMAGE_DEPLOY=agileiot/raspberry-pi3-zulujdk:8-jre
FROM $BASEIMAGE_BUILD
# Add packages
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates \
apt \
software-properties-common \
maven \
gettext \
pkg-config \
qdbus \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# resin-sync will always sync to /usr/src/app, so code needs to be here.
WORKDIR /usr/src/app
ENV APATH /usr/src/app
COPY scripts scripts
# copy directories into WORKDIR
COPY org.eclipse.agail.microservice.DLinkNotifier org.eclipse.agail.microservice.DLinkNotifier
RUN cd org.eclipse.agail.microservice.DLinkNotifier && mvn package
FROM $BASEIMAGE_DEPLOY
WORKDIR /usr/src/app
ENV APATH /usr/src/app
RUN apt-get update && apt-get install --no-install-recommends -y \
qdbus \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=0 $APATH/scripts scripts
COPY --from=0 $APATH/org.eclipse.agail.microservice.DLinkNotifier/target/agile-dlink-notifier-1.0.0-jar-with-dependencies.jar org.eclipse.agail.microservice.DLinkNotifier/target/agile-dlink-notifier-1.0.0-jar-with-dependencies.jar
CMD [ "bash", "/usr/src/app/scripts/start.sh" ]