Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unable to create cygnus-ngsi image from given DOCKFILE #2282 #2283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docker/cygnus-ngsi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ENV CYGNUS_JAVA_OPTS "-Xms2048m -Xmx4096m"
ENV CYGNUS_API_PORT "5080"
ENV CYGNUS_MULTIAGENT false
ENV CYGNUS_MONITORING_TYPE ""
ENV GIT_URL_CYGNUS "https://github.com/telefonicaid/fiware-cygnus.git"
ENV GIT_REV_CYGNUS "master"

# These variables are optional ENV variables to docker runtime
ENV CYGNUS_SKIP_CONF_GENERATION false
Expand Down Expand Up @@ -258,10 +260,6 @@ ENV FLUME_URL "https://archive.apache.org/dist/flume/${FLUME_VER}/${FLUME_TGZ}"

ENV JAVA_VERSION "1.11.0"

COPY / ${CYGNUS_HOME}

WORKDIR ${CYGNUS_HOME}

RUN ls -lsrt

# Install
Expand All @@ -271,7 +269,7 @@ RUN \
# Install dependencies
apt-get -y install openjdk-11-jdk curl git python2 maven && \
# Add Cygnus user
adduser ${CYGNUS_USER} && \
adduser ${CYGNUS_USER} --disabled-password --shell /bin/bash --gecos "User" $username && \
export JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk-amd64 && \
export MAVEN_OPTS="-Xmx2048M -Xss128M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=2048M -Dfile.encoding=UTF-8 -Dproject.build.sourceEncoding=UTF-8 -Dmaven.compiler.useIncrementalCompilation=false -DdependencyLocationsEnabled=false -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled" && \
export MAVEN_ARGS="-B -T8" && \
Expand All @@ -289,7 +287,9 @@ RUN \
mkdir -p ${FLUME_HOME}/plugins.d/cygnus/lib && \
mkdir -p ${FLUME_HOME}/plugins.d/cygnus/libext && \
chown -R cygnus:cygnus ${FLUME_HOME} && \
git clone ${GIT_URL_CYGNUS} ${CYGNUS_HOME} && \
cd ${CYGNUS_HOME} && \
git checkout ${GIT_REV_CYGNUS} && \
echo "INFO: Build and install cygnus-common" && \
cd ${CYGNUS_HOME}/cygnus-common && \
mvn ${MAVEN_ARGS} clean compile exec:exec assembly:single && \
Expand Down Expand Up @@ -335,11 +335,11 @@ RUN \
echo "INFO: END build"


COPY docker/cygnus-ngsi/cygnus-entrypoint.sh /
COPY docker/cygnus-ngsi/agent.conf ${FLUME_HOME}/conf/
COPY docker/cygnus-ngsi/agent.conf ${CYGNUS_HOME}/docker/cygnus-ngsi/agent.conf
COPY cygnus-entrypoint.sh /
COPY agent.conf ${FLUME_HOME}/conf/
COPY agent.conf ${CYGNUS_HOME}/docker/cygnus-ngsi/agent.conf
RUN true
COPY docker/cygnus-ngsi/cartodb_keys.conf ${FLUME_HOME}/conf/
COPY cartodb_keys.conf ${FLUME_HOME}/conf/

# Define the entry point
ENTRYPOINT ["/cygnus-entrypoint.sh"]
Expand Down
Loading