{"action":"created","issue":{"url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/37","repository_url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira","labels_url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/37/comments","events_url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/37/events","html_url":"https://github.com/cptactionhank/docker-atlassian-jira/issues/37","id":207407351,"number":37,"title":"Alpine variant?","user":{"login":"starlightknight","id":3959228,"avatar_url":"https://avatars3.githubusercontent.com/u/3959228?v=4","gravatar_id":"","url":"https://api.github.com/users/starlightknight","html_url":"https://github.com/starlightknight","followers_url":"https://api.github.com/users/starlightknight/followers","following_url":"https://api.github.com/users/starlightknight/following{/other_user}","gists_url":"https://api.github.com/users/starlightknight/gists{/gist_id}","starred_url":"https://api.github.com/users/starlightknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starlightknight/subscriptions","organizations_url":"https://api.github.com/users/starlightknight/orgs","repos_url":"https://api.github.com/users/starlightknight/repos","events_url":"https://api.github.com/users/starlightknight/events{/privacy}","received_events_url":"https://api.github.com/users/starlightknight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-14T03:23:50Z","updated_at":"2017-10-11T13:07:57Z","closed_at":null,"author_association":"NONE","body":"Have you considered making an Alpine variant of these images available? Since your images are already based off of java:8, making an alpine variant is very simple.\r\n\r\nI was able to make a fully functioning alpine variant of the jira container with a few minor tweaks to the Dockerfile, and I shrunk the container footprint from ~1.02GB -> 488MB, cutting the storage burden by more than half.\r\n\r\nThree main tweaks are required:\r\n\r\n1. Extend openjdk:8-alpine instead of java:8\r\n2. Convert apt-get entries -> alpine's apk package manager\r\n3. Created a dedicated jira user/group\r\n\r\n*Note: This user has uid 100:1000. If you moved to this image and had persistent storage on a volume, you may have to fix permissions with chown -R 100:1000, but I was otherwise able to cut over seamlessly.\r\n\r\nEverything seems to work fine with half the storage burden.\r\n\r\n```\r\nFROM openjdk:8-alpine\r\n\r\n# Configuration variables.\r\nENV JIRA_HOME     /var/atlassian/jira\r\nENV JIRA_INSTALL  /opt/atlassian/jira\r\nENV JIRA_VERSION  7.3.1\r\n\r\n# Install Atlassian JIRA and helper tools and setup initial home\r\n# directory structure.\r\nRUN set -x \\\r\n    && apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main --repository http://dl-cdn.alpinelinux.org/alpine/edge/community add coreutils sed bash curl tar xmlstarlet tomcat-native \\\r\n    && addgroup jira \\\r\n    && adduser -S -G jira jira \\\r\n    && mkdir -p                \"${JIRA_HOME}\" \\\r\n    && mkdir -p                \"${JIRA_HOME}/caches/indexes\" \\\r\n    && chmod -R 700            \"${JIRA_HOME}\" \\\r\n    && chown -R jira:jira      \"${JIRA_HOME}\" \\\r\n    && mkdir -p                \"${JIRA_INSTALL}/conf/Catalina\" \\\r\n    && curl -Ls                \"https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-core-${JIRA_VERSION}.tar.gz\" | tar -xz --directory \"${JIRA_INSTALL}\" --strip-components=1 --no-same-owner \\\r\n    && curl -Ls                \"https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.38.tar.gz\" | tar -xz --directory \"${JIRA_INSTALL}/lib\" --strip-components=1 --no-same-owner \"mysql-connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar\" \\\r\n    && rm -f                   \"${JIRA_INSTALL}/lib/postgresql-9.1-903.jdbc4-atlassian-hosted.jar\" \\\r\n    && curl -Ls                \"https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar\" -o \"${JIRA_INSTALL}/lib/postgresql-9.4.1212.jar\" \\\r\n    && chmod -R 700            \"${JIRA_INSTALL}/conf\" \\\r\n    && chmod -R 700            \"${JIRA_INSTALL}/logs\" \\\r\n    && chmod -R 700            \"${JIRA_INSTALL}/temp\" \\\r\n    && chmod -R 700            \"${JIRA_INSTALL}/work\" \\\r\n    && chown -R jira:jira      \"${JIRA_INSTALL}/conf\" \\\r\n    && chown -R jira:jira      \"${JIRA_INSTALL}/logs\" \\\r\n    && chown -R jira:jira      \"${JIRA_INSTALL}/temp\" \\\r\n    && chown -R jira:jira      \"${JIRA_INSTALL}/work\" \\\r\n    && sed --in-place          \"s/java version/openjdk version/g\" \"${JIRA_INSTALL}/bin/check-java.sh\" \\\r\n    && echo -e                 \"\\njira.home=$JIRA_HOME\" >> \"${JIRA_INSTALL}/atlassian-jira/WEB-INF/classes/jira-application.properties\" \\\r\n    && touch -d \"@0\"           \"${JIRA_INSTALL}/conf/server.xml\"\r\n\r\n# Use a specified service account\r\nUSER jira:jira\r\n\r\n# Expose default HTTP connector port.\r\nEXPOSE 8080\r\n\r\n# Set volume mount points for installation and home directory. Changes to the\r\n# home directory needs to be persisted as well as parts of the installation\r\n# directory due to eg. logs.\r\nVOLUME [\"/var/atlassian/jira\", \"/opt/atlassian/jira/logs\"]\r\n\r\n# Set the default working directory as the installation directory.\r\nWORKDIR /var/atlassian/jira\r\n\r\nCOPY \"docker-entrypoint.sh\" \"/\"\r\nENTRYPOINT [\"/docker-entrypoint.sh\"]\r\n\r\n# Run Atlassian JIRA as a foreground process by default.\r\nCMD [\"/opt/atlassian/jira/bin/catalina.sh\", \"run\"]\r\n```"},"comment":{"url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/comments/335803515","html_url":"https://github.com/cptactionhank/docker-atlassian-jira/issues/37#issuecomment-335803515","issue_url":"https://api.github.com/repos/cptactionhank/docker-atlassian-jira/issues/37","id":335803515,"user":{"login":"marton78","id":1110028,"avatar_url":"https://avatars0.githubusercontent.com/u/1110028?v=4","gravatar_id":"","url":"https://api.github.com/users/marton78","html_url":"https://github.com/marton78","followers_url":"https://api.github.com/users/marton78/followers","following_url":"https://api.github.com/users/marton78/following{/other_user}","gists_url":"https://api.github.com/users/marton78/gists{/gist_id}","starred_url":"https://api.github.com/users/marton78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marton78/subscriptions","organizations_url":"https://api.github.com/users/marton78/orgs","repos_url":"https://api.github.com/users/marton78/repos","events_url":"https://api.github.com/users/marton78/events{/privacy}","received_events_url":"https://api.github.com/users/marton78/received_events","type":"User","site_admin":false},"created_at":"2017-10-11T13:07:57Z","updated_at":"2017-10-11T13:07:57Z","author_association":"NONE","body":"You can check my repository, https://github.com/marton78/atlassian based on @cptactionhank's work. All images use Alpine, Oracle Java (as required by Atlassian) and Tomcat Native."}}
{"actor":{"display_login":"marton78"}}