744890ebba3f7a1758fad83f5791d1ecde5deff8
[integration/packaging.git] / odl-docker / Dockerfile
1 # SPDX-License-Identifier: EPL-1.0
2 ##############################################################################
3 # Copyright (c) 2021 The Linux Foundation and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Eclipse Public License v1.0
7 # which accompanies this distribution, and is available at
8 # http://www.eclipse.org/legal/epl-v10.html
9 ##############################################################################
10
11 FROM openjdk:11 AS stage0
12
13 WORKDIR /opt/opendaylight
14
15 ADD opendaylight .
16
17 RUN groupadd -r karaf --gid=8181 && \
18     useradd -rm -g karaf --uid=8181 karaf && \
19     chown -R karaf:karaf .
20
21 FROM scratch
22
23 ENV JAVA_HOME /usr/local/openjdk-11
24 ENV PATH $PATH:$JAVA_HOME/bin
25 ENV FEATURES odl-restconf
26
27 COPY --from=stage0 / /
28
29 WORKDIR /opt/opendaylight
30
31 USER karaf
32 EXPOSE 8101 8181
33 CMD ./start_docker.sh