mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 06:05:37 +03:00
added custom versions for jira
This commit is contained in:
parent
954a560fad
commit
24298c13e7
1
confluence/5.10.8/init
Normal file
1
confluence/5.10.8/init
Normal file
@ -0,0 +1 @@
|
||||
init
|
1
confluence/5.6.4/init
Normal file
1
confluence/5.6.4/init
Normal file
@ -0,0 +1 @@
|
||||
init
|
42
jira/7.10.0/Dockerfile
Normal file
42
jira/7.10.0/Dockerfile
Normal file
@ -0,0 +1,42 @@
|
||||
FROM anapsix/alpine-java:8_jdk
|
||||
MAINTAINER Atlassian Jira Server Team
|
||||
|
||||
ENV RUN_USER daemon
|
||||
ENV RUN_GROUP daemon
|
||||
|
||||
ENV JIRA_HOME /var/atlassian/application-data/jira
|
||||
ENV JIRA_INSTALL_DIR /opt/atlassian/jira
|
||||
|
||||
VOLUME ["${JIRA_HOME}"]
|
||||
|
||||
# Expose HTTP port
|
||||
EXPOSE 8080
|
||||
|
||||
WORKDIR $JIRA_HOME
|
||||
|
||||
CMD ["/entrypoint.sh", "-fg"]
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
|
||||
#RUN apk update -qq \
|
||||
# && update-ca-certificates \
|
||||
# && apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini libc6-compat \
|
||||
# && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
|
||||
|
||||
RUN apk update -qq \
|
||||
&& apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini \
|
||||
&& update-ca-certificates \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ARG JIRA_VERSION=7.10.0
|
||||
ARG DOWNLOAD_URL=http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
|
||||
|
||||
|
||||
COPY . /tmp
|
||||
|
||||
RUN mkdir -p ${JIRA_INSTALL_DIR} \
|
||||
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \
|
||||
&& chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \
|
||||
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Djira.home=\${JIRA_HOME}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \
|
||||
&& sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml
|
1
jira/latest/.docker-repository.yml
Normal file
1
jira/latest/.docker-repository.yml
Normal file
@ -0,0 +1 @@
|
||||
repository: epicmorg/jira
|
3
jira/latest/.dockerignore
Normal file
3
jira/latest/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
.git
|
||||
scripts
|
||||
.idea
|
4
jira/latest/Makefile
Normal file
4
jira/latest/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
all: jira
|
||||
|
||||
jira:
|
||||
docker build --no-cache -t epicmorg/jira .
|
43
jira/latest/README.md
Normal file
43
jira/latest/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
![Atlassian Jira Server](https://www.atlassian.com/dam/wac/legacy/jira_logo_landing.png)
|
||||
|
||||
# Overview
|
||||
|
||||
This Docker unofficial container makes it easy to get an instance of Jira up and running.
|
||||
|
||||
## Memory / Heap Size
|
||||
|
||||
If you need to override Jira Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables.
|
||||
|
||||
* `JVM_MINIMUM_MEMORY` (default: 1024m)
|
||||
|
||||
The minimum heap size of the JVM
|
||||
|
||||
* `JVM_MAXIMUM_MEMORY` (default: 1024m)
|
||||
|
||||
The maximum heap size of the JVM
|
||||
|
||||
## Reverse Proxy Settings
|
||||
|
||||
If Jira is run behind a reverse proxy server, then you need to specify extra options to make Jira aware of the setup. They can be controlled via the below environment variables.
|
||||
|
||||
* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE)
|
||||
|
||||
The reverse proxy's fully qualified hostname.
|
||||
|
||||
* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE)
|
||||
|
||||
The reverse proxy's port number via which Jira is accessed.
|
||||
|
||||
* `CATALINA_CONNECTOR_SCHEME` (default: http)
|
||||
|
||||
The protocol via which Jira is accessed.
|
||||
|
||||
* `CATALINA_CONNECTOR_SECURE` (default: false)
|
||||
|
||||
Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'.
|
||||
|
||||
## JVM configuration
|
||||
|
||||
If you need to pass additional JVM arguments to Jira such as specifying a custom trust store, you can add them via the below environment variable
|
||||
|
||||
* `JVM_SUPPORT_RECOMMENDED_ARGS`
|
33
jira/latest/entrypoint.sh
Executable file
33
jira/latest/entrypoint.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Setup Catalina Opts
|
||||
: ${CATALINA_CONNECTOR_PROXYNAME:=}
|
||||
: ${CATALINA_CONNECTOR_PROXYPORT:=}
|
||||
: ${CATALINA_CONNECTOR_SCHEME:=http}
|
||||
: ${CATALINA_CONNECTOR_SECURE:=false}
|
||||
|
||||
: ${CATALINA_OPTS:=}
|
||||
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}"
|
||||
CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}"
|
||||
|
||||
export CATALINA_OPTS
|
||||
|
||||
|
||||
# Start Confluence 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" "${JIRA_HOME}")
|
||||
EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700
|
||||
if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then
|
||||
chmod -R 700 "${JIRA_HOME}" &&
|
||||
chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}"
|
||||
fi
|
||||
# Now drop privileges
|
||||
exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@"
|
||||
else
|
||||
exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@"
|
||||
fi
|
13
jira/latest/hooks/post_push
Normal file
13
jira/latest/hooks/post_push
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Parse image name for repo name
|
||||
tagStart=$(expr index "$IMAGE_NAME" :)
|
||||
repoName=${IMAGE_NAME:0:tagStart-1}
|
||||
|
||||
# Tag and push image for each additional tag
|
||||
for tag in `git tag -l --points-at HEAD`; do
|
||||
docker tag $IMAGE_NAME ${repoName}:${tag}
|
||||
docker push ${repoName}:${tag}
|
||||
done
|
Loading…
Reference in New Issue
Block a user