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

View File

@ -20,14 +20,14 @@ export FISHEYE_OPTS="${FISHEYE_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"
# Start Bamboo as the correct user # Start Bamboo as the correct user
if [ "${UID}" -eq 0 ]; then 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}" 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 EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700
if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then
chmod -R 700 "${FISHEYE_HOME}" && chmod -R 700 "${FISHEYE_INST}" &&
chown -R "${RUN_USER}:${RUN_GROUP}" "${FISHEYE_HOME}" chown -R "${RUN_USER}:${RUN_GROUP}" "${FISHEYE_INST}"
fi fi
# Now drop privileges # 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 else
exec "$FISHEYE_INST/bin/fisheyectl.sh" "$@" exec "$FISHEYE_HOME/bin/fisheyectl.sh" "$@"
fi fi

View File

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