This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
53 lines (46 loc) · 2.25 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
ARG PARENT_IMAGE=openjdk:11-jre-slim-buster
FROM $PARENT_IMAGE
# These are only defaults if not running in Github Actions! The real
# versions are maintained in .github/workflows/docker-image.yml
ARG ODL_VERSION=15.1.0
ARG DISTRIBUTION_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/opendaylight/$ODL_VERSION/opendaylight-$ODL_VERSION.tar.gz
ARG BUILD_DATE=undefined
ARG SOURCE_COMMIT=undefined
LABEL org.label-schema.name="OpenDaylight" \
org.label-schema.description="OpenDaylight SDN controller" \
org.label-schema.date="$BUILD_DATE" \
org.label-schema.usage="https://github.com/sfuhrm/docker-opendaylight/blob/master/README.md" \
org.label-schema.url="https://www.opendaylight.org/" \
org.label-schema.vendor="1&1 IONOS SE" \
org.label-schema.version="$ODL_VERSION" \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-url="https://github.com/sfuhrm/docker-opendaylight.git" \
org.label-schema.vcs-ref="$SOURCE_COMMIT" \
org.opencontainers.image.created="$BUILD_DATE" \
org.opencontainers.authors="stephan.fuhrmann@ionos.com" \
org.opencontainers.image.url="https://www.opendaylight.org/" \
org.opencontainers.image.documentation="https://www.opendaylight.org/" \
org.opencontainers.image.source="https://github.com/sfuhrm/docker-opendaylight" \
org.opencontainers.image.version="$ODL_VERSION" \
org.opencontainers.image.vendor="1&1 IONOS SE" \
org.opencontainers.image.title="OpenDaylight" \
org.opencontainers.image.description="OpenDaylight SDN controller" \
maintainer="stephan.fuhrmann@ionos.com"
RUN mkdir /odl
WORKDIR /odl
COPY docker-entrypoint.sh /docker-entrypoint.sh
# wget is used for fetching the tar.gz on build time
# procps is used by the karaf shell script
RUN apt-get update && apt-get install -y --no-install-recommends wget procps && \
wget -O - $DISTRIBUTION_URL | \
tar -xzf- --strip-components 1 && \
apt-get remove -y wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/cache/apt && \
useradd --home-dir /odl odl && \
chown -R odl:odl /odl
EXPOSE 6633 8101 8181
USER odl
ENV ODL_VERSION=$ODL_VERSION
ENV ODL_LOGLEVEL=INFO
CMD ["/docker-entrypoint.sh"]