mirror of
https://github.com/Fishwaldo/DockerFiles.git
synced 2025-03-15 19:31:39 +00:00
add Alassian SDK
This commit is contained in:
parent
0707b1e2bc
commit
d30ad470dd
5 changed files with 179 additions and 0 deletions
2
AtlassianSDK/.gitignore
vendored
Normal file
2
AtlassianSDK/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*.iml
|
||||
.idea
|
55
AtlassianSDK/Dockerfile
Normal file
55
AtlassianSDK/Dockerfile
Normal file
|
@ -0,0 +1,55 @@
|
|||
FROM codeclou/docker-oracle-jdk:8u152
|
||||
|
||||
ENV ATLS_VERSIN 8.0.9
|
||||
|
||||
#
|
||||
# BASE PACKAGES + DOWNLOAD GLIBC & ORACLE JAVA & ATLASSIAN SDK
|
||||
#
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
http-parser \
|
||||
libcrypto1.0 \
|
||||
libssl1.0 \
|
||||
libstdc++ \
|
||||
libuv \
|
||||
musl \
|
||||
zlib \
|
||||
curl \
|
||||
gzip \
|
||||
tar && \
|
||||
mkdir -p /opt/atlas/ && \
|
||||
mkdir -p /opt/atlas-work/ && \
|
||||
echo "=== INSTALLING ATLASSIAN SDK==================" && \
|
||||
curl -jkSL -o /opt/atlassian-plugin-sdk-${ATLS_VERSIN}.tar.gz \
|
||||
https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/amps/atlassian-plugin-sdk/${ATLS_VERSIN}/atlassian-plugin-sdk-${ATLS_VERSIN}.tar.gz
|
||||
|
||||
#
|
||||
# INSTALL AND CONFIGURE
|
||||
#
|
||||
COPY docker-entrypoint.sh /opt/docker-entrypoint.sh
|
||||
RUN chmod u+rx,g+rx,o+rx,a-w /opt/docker-entrypoint.sh && \
|
||||
addgroup -g 10777 worker && \
|
||||
adduser -D -G worker -u 10777 worker && \
|
||||
chown -R worker:worker /opt/atlas/ && \
|
||||
chmod -R u+rwx,g+rwx,o-rwx /opt/atlas/ && \
|
||||
chown -R worker:worker /opt/atlas-work/ && \
|
||||
chmod -R u+rwx,g+rwx,o-rwx /opt/atlas-work/ && \
|
||||
tar -C /opt -xf /opt/atlassian-plugin-sdk-${ATLS_VERSIN}.tar.gz && \
|
||||
chown -R worker:root /opt/atlassian-plugin-sdk-${ATLS_VERSIN} && \
|
||||
rm -f /opt/atlassian-plugin-sdk-${ATLS_VERSIN}.tar.gz && \
|
||||
apk del curl gzip tar && \
|
||||
rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
#
|
||||
# RUN
|
||||
#
|
||||
EXPOSE 2990
|
||||
USER worker
|
||||
ENV MAVEN_REPOSITORY_MIRROR "false"
|
||||
ENV JAVA_HOME /opt/jdk
|
||||
ENV PATH ${PATH}:/opt/atlassian-plugin-sdk-${ATLS_VERSIN}/bin/:/opt/jdk/bin/
|
||||
WORKDIR /opt/atlas/
|
||||
VOLUME ["/opt/atlas/"]
|
||||
ENTRYPOINT ["/opt/docker-entrypoint.sh"]
|
||||
CMD ["atlas-version"]
|
9
AtlassianSDK/LICENSE.md
Normal file
9
AtlassianSDK/LICENSE.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# The MIT License (MIT)
|
||||
|
||||
Copyright (c) `2016` `Bernhard Grünewaldt`
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
99
AtlassianSDK/README.md
Normal file
99
AtlassianSDK/README.md
Normal file
|
@ -0,0 +1,99 @@
|
|||
# docker-atlassian-sdk
|
||||
|
||||
[](https://hub.docker.com/r/codeclou/docker-atlassian-sdk/tags/) [](https://alpinelinux.org/) [](https://docs.docker.com/engine/reference/builder/#/user)
|
||||
|
||||
Docker-Image to run [Atlassian Pugin SDK](https://developer.atlassian.com/display/DOCS/Getting+Started) Commands.
|
||||
Includes [Oracle Java 8 JDK](https://www.oracle.com/java/) and [glibc](https://github.com/sgerrand/alpine-pkg-glibc).
|
||||
|
||||
|
||||
-----
|
||||
|
||||
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* Runs as non-root with fixed UID 10777 and GID 10777. See [howto prepare volume permissions](https://github.com/codeclou/doc/blob/master/docker/README.md).
|
||||
* See [howto use SystemD for named Docker-Containers and system startup](https://github.com/codeclou/doc/blob/master/docker/README.md).
|
||||
|
||||
-----
|
||||
|
||||
|
||||
|
||||
### Usage
|
||||
|
||||
Assuming you have your e.g. JIRA© Plugin Source in `myproject`.
|
||||
You can then run [`atlas-package`](https://developer.atlassian.com/docs/developer-tools/working-with-the-sdk/command-reference/atlas-package) with the following command.
|
||||
|
||||
```bash
|
||||
cd myproject
|
||||
docker run \
|
||||
-i -t \
|
||||
--volume $(pwd)/:/opt/atlas \
|
||||
codeclou/docker-atlassian-sdk:latest \
|
||||
atlas-package
|
||||
|
||||
## OR
|
||||
|
||||
docker run \
|
||||
-i -t \
|
||||
--volume $(pwd)/:/opt/atlas \
|
||||
codeclou/docker-atlassian-sdk:sdk-6.2.14 \
|
||||
atlas-package
|
||||
```
|
||||
|
||||
Run a certain JIRA© Version standalone for testing. (Note: On macOS it might be very slow to use VOLUME)
|
||||
|
||||
```
|
||||
docker run \
|
||||
-i -t \
|
||||
-p 2990:2990 \
|
||||
--volume $(pwd)/:/opt/atlas \
|
||||
-e MAVEN_REPOSITORY_MIRROR="http://build-local.codeclou.io:8081/artifactory/all/" \
|
||||
codeclou/docker-atlassian-sdk:latest \
|
||||
atlas-run-standalone --version 7.3.0 --product jira --http-port 2990 --server 0.0.0.0 \
|
||||
--jvmargs -Xmx4096M -DskipAllPrompts=true
|
||||
```
|
||||
|
||||
Then go to http://localhost:2990/jira/
|
||||
|
||||
-----
|
||||
|
||||
|
||||
|
||||
### Usage with Maven-Repository-Mirror
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-i -t \
|
||||
--volume $(pwd)/:/opt/atlas \
|
||||
-e MAVEN_REPOSITORY_MIRROR="http://build-local.codeclou.io:8081/artifactory/all/" \
|
||||
codeclou/docker-atlassian-sdk:latest \
|
||||
atlas-package
|
||||
```
|
||||
|
||||
You **need to have a [JFrog Artifactory service](https://www.jfrog.com/open-source/) (or similiar) runnning** with a Virtual Repository that mirrors at least the following **Maven Repositories**:
|
||||
|
||||
```
|
||||
https://maven.atlassian.com/3rdparty/
|
||||
https://maven.atlassian.com/public/
|
||||
https://maven.atlassian.com/public-snapshot/
|
||||
https://repo.maven.apache.org/maven2/
|
||||
https://repo.spring.io/release
|
||||
https://repo.spring.io/milestone
|
||||
https://repo.spring.io/snapshot
|
||||
https://maven.java.net/content/groups/public/
|
||||
http://maven.jahia.org/maven2/
|
||||
```
|
||||
|
||||
The URL to the Maven Repository Mirror is set via the `MAVEN_REPOSITORY_MIRROR` ENV Variable.
|
||||
|
||||
-----
|
||||
|
||||
|
||||
### License, Liability & Support
|
||||
|
||||
* [](https://github.com/codeclou/docker-atlassian-sdk/blob/master/LICENSE.md)
|
||||
* Dockerfile and Image is provided under [MIT License](https://github.com/codeclou/docker-atlassian-sdk/blob/master/LICENSE.md)
|
||||
* [Atlassian Plugin SDK](https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project) might be licensed differently. Please check for yourself.
|
||||
* [Oracle Java JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) might be licensed differently. Please check for yourself.
|
||||
* Note: By using this docker image you automatically accept the License Terms of Oracle Java 8 JDK and Atlassian SDK.
|
14
AtlassianSDK/docker-entrypoint.sh
Normal file
14
AtlassianSDK/docker-entrypoint.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
umask u+rxw,g+rwx,o-rwx
|
||||
|
||||
if [ "$MAVEN_REPOSITORY_MIRROR" != "false" ]
|
||||
then
|
||||
echo ">> DOCKER-ENTRYPOINT: INJECTING MAVEN REPOSITORY MIRROR WITH URL: ${MAVEN_REPOSITORY_MIRROR}"
|
||||
ATLAS_MAVEN_HOME=$(atlas-version | grep "ATLAS Maven Home" | awk '{print $4}') && \
|
||||
sed -i "s@<mirrors>@<mirrors><mirror><mirrorOf>*</mirrorOf><name>remote-repos</name><url>${MAVEN_REPOSITORY_MIRROR}</url><id>remote-repos</id></mirror>@g" $ATLAS_MAVEN_HOME/conf/settings.xml
|
||||
fi
|
||||
|
||||
exec "$@"
|
Loading…
Add table
Reference in a new issue