This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from airdock-io/develop
Adding multiple JDK version and stable tag
- Loading branch information
Showing
114 changed files
with
4,113 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
.git | ||
.idea | ||
*.md | ||
Makefile | ||
LICENSE | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# VERSION 1.1 | ||
# AUTHOR: Jerome Guibert <jguibert@gmail.com> | ||
# DESCRIPTION: Oracle Java 8u66 | ||
# TO_BUILD: make build | ||
# SOURCE: https://github.com/airdock-io/docker-oracle-jdk/tree/master/jdk-8u66 | ||
|
||
FROM airdock/base:latest | ||
MAINTAINER Jerome Guibert <jguibert@gmail.com> | ||
|
||
# Add java dynamic memory script | ||
COPY java-dynamic-memory-opts /srv/java/ | ||
|
||
# Install Oracle JDK 8u66 | ||
RUN cd /srv/java && \ | ||
curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" -k "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz" && \ | ||
tar xvf jdk-8u66-linux-x64.tar.gz -C /srv/java && \ | ||
rm -f jdk-8u66-linux-x64.tar.gz && \ | ||
ln -s /srv/java/jdk1.* /srv/java/jdk && \ | ||
chown -R java:java /srv/java && \ | ||
/root/post-install | ||
|
||
# Define commonly used JAVA_HOME variable | ||
ENV JAVA_HOME /srv/java/jdk | ||
|
||
# Add /srv/java and jdk on PATH variable | ||
ENV PATH ${PATH}:${JAVA_HOME}/bin:/srv/java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,54 @@ | ||
DIRS := oracle-java7 oracle-java8 | ||
BUILD_DIRS := $(addsuffix .build,$(DIRS)) | ||
CLEAN_DIRS := $(addsuffix .clean,$(DIRS)) | ||
NAMESPACE = airdock | ||
NAME = oracle-jdk | ||
FULLNAME = $(NAMESPACE)/$(NAME) | ||
VERSION = 8u66 | ||
|
||
build: $(BUILD_DIRS) | ||
$(BUILD_DIRS): | ||
@echo $@ | ||
$(MAKE) -C $(basename $@) build | ||
.PHONY: all clean build tag_latest release debug run save start usage | ||
|
||
all: usage build | ||
|
||
clean: $(CLEAN_DIRS) | ||
$(CLEAN_DIRS): | ||
@echo $@ | ||
$(MAKE) -C $(basename $@) clean | ||
clean: | ||
@CID=$(docker ps -a | awk '{ print $$1 " " $$2 }' | grep $(FULLNAME) | awk '{ print $$1 }'); if [ ! -z "$$CID" ]; then echo "Removing container which reference $(FULLNAME)"; for container in $(CID); do docker rm -f $$container; done; fi; | ||
@echo "Removing image $(FULLNAME)" | ||
@if docker images $(FULLNAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then docker rmi -f $(FULLNAME):$(VERSION); fi | ||
@if docker images $(FULLNAME) | awk '{ print $$2 }' | grep -q -F latest; then docker rmi -f $(FULLNAME):latest; fi | ||
|
||
|
||
.PHONY: build $(BUILD_DIRS) clean $(CLEAN_DIRS) | ||
|
||
build: clean | ||
docker build -t $(FULLNAME):$(VERSION) --rm . | ||
|
||
tag_latest: | ||
@docker tag $(FULLNAME):$(VERSION) $(FULLNAME):latest | ||
|
||
release: build tag_latest | ||
docker push $(FULLNAME) | ||
@echo "Create a tag v-$(VERSION)" | ||
@git tag v-$(VERSION) | ||
@git push origin v-$(VERSION) | ||
|
||
debug: | ||
@docker run -t -i $(FULLNAME):$(VERSION) /bin/bash | ||
|
||
save: | ||
@OUTPUT_FILE = $(NAME)_$(VERSION)_`date +%Y%m%d%H%M%S`.tgz | ||
@docker save $(FULLNAME):$(VERSION) | gzip --best --stdout > $(OUTPUT_FILE) | ||
@echo "Image $(FULLNAME):$(VERSION) exported to $(OUTPUT_FILE)" | ||
|
||
run: | ||
@echo "IPAddress =" $$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $$(docker run -d $(FULLNAME):$(VERSION))) | ||
|
||
start: | ||
@docker-machine start default | ||
@eval "$(docker-machine env default)" | ||
|
||
usage: | ||
@echo "List of target" | ||
@echo "all (default): print usage and build" | ||
@echo "clean: remove containers and image" | ||
@echo "build: build docker image" | ||
@echo "tag_latest: build and tag image with 'latest'" | ||
@echo "debug: launch a shell with this image" | ||
@echo "save: export this image" | ||
@echo "run: launch this image with inner command" | ||
@echo "start: start docker machine" | ||
@echo "usage: this help" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Oracle Java | ||
|
||
Docker Image for Oracle Java 8 and 7 | ||
Docker Image for Oracle Java SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
# example usage: | ||
# exec java $(java-dynamic-memory-opts 80) -jar myfatjar.jar | ||
|
||
# JVM uses only 1/4 of system memory by default | ||
DEFAULT_MEM_JAVA_PERCENT=80 | ||
|
||
if [ -n "$1" ] | ||
then | ||
MEM_JAVA_PERCENT=$1 | ||
else | ||
MEM_JAVA_PERCENT=$DEFAULT_MEM_JAVA_PERCENT | ||
fi | ||
|
||
MEM_TOTAL_KB=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') | ||
MEM_JAVA_KB=$(($MEM_TOTAL_KB * $MEM_JAVA_PERCENT / 100)) | ||
|
||
echo "-Xmx${MEM_JAVA_KB}k" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.idea | ||
*.md | ||
Makefile | ||
LICENSE | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Created by https://www.gitignore.io | ||
|
||
### vim ### | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
*.un~ | ||
Session.vim | ||
.netrwhist | ||
*~ | ||
|
||
|
||
### Intellij ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
|
||
*.iml | ||
|
||
## Directory-based project format: | ||
.idea/ | ||
|
||
## File-based project format: | ||
*.ipr | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# VERSION 1.1 | ||
# AUTHOR: Jerome Guibert <jguibert@gmail.com> | ||
# DESCRIPTION: Oracle Java 7u80 | ||
# TO_BUILD: make build | ||
# SOURCE: https://github.com/airdock-io/docker-oracle-jdk/tree/master/jdk-7u80 | ||
|
||
FROM airdock/base:latest | ||
MAINTAINER Jerome Guibert <jguibert@gmail.com> | ||
|
||
# Add java dynamic memory script | ||
COPY java-dynamic-memory-opts /srv/java/ | ||
|
||
# Install Oracle JDK 7u80 | ||
RUN cd /srv/java && \ | ||
curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" -k "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz" && \ | ||
tar xvf jdk-7u80-linux-x64.tar.gz -C /srv/java && \ | ||
rm -f jdk-7u80-linux-x64.tar.gz && \ | ||
ln -s /srv/java/jdk1.* /srv/java/jdk && \ | ||
chown -R java:java /srv/java && \ | ||
/root/post-install | ||
|
||
# Define commonly used JAVA_HOME variable | ||
ENV JAVA_HOME /srv/java/jdk | ||
|
||
# Add /srv/java and jdk on PATH variable | ||
ENV PATH ${PATH}:${JAVA_HOME}/bin:/srv/java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Airdock.io | ||
|
||
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. |
Oops, something went wrong.