fishyey fix

This commit is contained in:
STAM 2020-03-02 13:18:13 +03:00
parent cff35f3154
commit 66c1bfd933
3 changed files with 14 additions and 13 deletions

View File

@ -18,11 +18,11 @@ ENV RUN_USER daemon
ENV RUN_GROUP daemon
# https://confluence.atlassian.com/fisheye/fisheye-folder-layout-298976940.html
ENV FISHEYE_INST /opt/atlassian/fecru
ENV FISHEYE_HOME /var/atlassian/application-data/fecru
ENV FISHEYE_HOME /opt/atlassian/fecru
ENV FISHEYE_INST /var/atlassian/application-data/fecru
VOLUME ["${FISHEYE_HOME}"]
WORKDIR $FISHEYE_HOME
VOLUME ["${FISHEYE_INST}"]
WORKDIR $FISHEYE_INST
# Expose HTTP port
EXPOSE 8060
@ -30,12 +30,12 @@ EXPOSE 8060
##################################################################
# Installing
##################################################################
RUN mkdir -p ${FISHEYE_INST} \
RUN mkdir -p ${FISHEYE_HOME} \
&& wget -nv --random-wait -c -P /usr/bin ${P4_DOWNLOAD_URL} \
&& wget -nv --random-wait -c ${DOWNLOAD_URL} -O /tmp/fisheye-${FECRU_VERSION}.zip \
&& unzip -q /tmp/fisheye-${FECRU_VERSION}.zip -d /tmp \
&& mv /tmp/fecru-${FECRU_VERSION}/* ${FISHEYE_INST} \
&& chown -R ${RUN_USER}:${RUN_GROUP} ${FISHEYE_INST} \
&& mv /tmp/fecru-${FECRU_VERSION}/* ${FISHEYE_HOME} \
&& chown -R ${RUN_USER}:${RUN_GROUP} ${FISHEYE_HOME} \
&& chmod +x /usr/bin/p4 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
&& apt-get clean -y \

View File

@ -11,7 +11,7 @@ set -euo pipefail
if [ "${JVM_MINIMUM_MEMORY}" != "" ]; then
FISHEYE_OPTS="${FISHEYE_OPTS} -Xms${JVM_MINIMUM_MEMORY}"
fi
if [ "${JVM_MAXIMUM_MEMORY}" != "" ]; then
if [ "${JVM_MAXIMUM_MEMORY}" != "" ]; then
FISHEYE_OPTS="${FISHEYE_OPTS} -Xmx${JVM_MAXIMUM_MEMORY}"
fi
@ -20,14 +20,14 @@ export FISHEYE_OPTS="${FISHEYE_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"
# Start Bamboo as the correct user
if [ "${UID}" -eq 0 ]; then
echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}"
PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${FISHEYE_HOME}")
PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${FISHEYE_INST}")
EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700
if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then
chmod -R 700 "${FISHEYE_HOME}" &&
chown -R "${RUN_USER}:${RUN_GROUP}" "${FISHEYE_HOME}"
chmod -R 700 "${FISHEYE_INST}" &&
chown -R "${RUN_USER}:${RUN_GROUP}" "${FISHEYE_INST}"
fi
# Now drop privileges
exec su -s /bin/bash "${RUN_USER}" -c "$FISHEYE_INST/bin/fisheyectl.sh $@"
exec su -s /bin/bash "${RUN_USER}" -c "$FISHEYE_HOME/bin/fisheyectl.sh $@"
else
exec "$FISHEYE_INST/bin/fisheyectl.sh" "$@"
exec "$FISHEYE_HOME/bin/fisheyectl.sh" "$@"
fi

View File

@ -36,6 +36,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
htop \
iftop \
iputils-ping \
libsvn-java \
kmod \
libzip4 \
locales \