Skip to content

Commit

Permalink
added DESCRIPTION, ICON and dt-apt-install
Browse files Browse the repository at this point in the history
  • Loading branch information
afdaniele committed Jul 29, 2020
1 parent c8de4ee commit 96afde9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# parameters
ARG REPO_NAME="<REPO_NAME_HERE>"
ARG DESCRIPTION="<DESCRIPTION_HERE>"
ARG MAINTAINER="<YOUR_FULL_NAME> (<YOUR_EMAIL_ADDRESS>)"
# pick an icon from: https://fontawesome.com/v4.7.0/icons/
ARG ICON="cube"

# ==================================================>
# ==> Do not change the code below this line
Expand All @@ -17,7 +20,9 @@ FROM duckietown/${BASE_IMAGE}:${BASE_TAG}
ARG ARCH
ARG DISTRO
ARG REPO_NAME
ARG DESCRIPTION
ARG MAINTAINER
ARG ICON
ARG BASE_TAG
ARG BASE_IMAGE
ARG LAUNCHER
Expand All @@ -34,17 +39,16 @@ WORKDIR "${REPO_PATH}"

# keep some arguments as environment variables
ENV DT_MODULE_TYPE "${REPO_NAME}"
ENV DT_MODULE_DESCRIPTION "${DESCRIPTION}"
ENV DT_MODULE_ICON "${ICON}"
ENV DT_MAINTAINER "${MAINTAINER}"
ENV DT_REPO_PATH "${REPO_PATH}"
ENV DT_LAUNCH_PATH "${LAUNCH_PATH}"
ENV DT_LAUNCHER "${LAUNCHER}"

# install apt dependencies
COPY ./dependencies-apt.txt "${REPO_PATH}/"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
$(awk -F: '/^[^#]/ { print $1 }' dependencies-apt.txt | uniq) \
&& rm -rf /var/lib/apt/lists/*
RUN dt-apt-install ${REPO_PATH}/dependencies-apt.txt

# install python dependencies
COPY ./dependencies-py.txt "${REPO_PATH}/"
Expand Down Expand Up @@ -72,6 +76,8 @@ CMD ["bash", "-c", "dt-launcher-${DT_LAUNCHER}"]

# store module metadata
LABEL org.duckietown.label.module.type="${REPO_NAME}" \
org.duckietown.label.module.description="${DESCRIPTION}" \
org.duckietown.label.module.icon="${ICON}" \
org.duckietown.label.architecture="${ARCH}" \
org.duckietown.label.code.location="${REPO_PATH}" \
org.duckietown.label.code.version.distro="${DISTRO}" \
Expand Down

0 comments on commit 96afde9

Please sign in to comment.