-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MicroEJ GitHub Delivery
committed
Jul 26, 2024
1 parent
40ddaa9
commit 67050a5
Showing
9 changed files
with
362 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.9.0] - 2024-07-26 | ||
### Added | ||
- Add Dockerfile for sdk 5.9.0 and 5.9.0 jdk11 | ||
|
||
## [1.8.0] - 2024-02-09 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.2 and 5.8.2 jdk11 | ||
|
||
## [1.7.1] - 2023-10-18 | ||
### Changed | ||
- Add build hooks for Dockerhub | ||
|
||
## [1.7.0] - 2023-10-18 | ||
### Changed | ||
- Add EULA acceptation check when starting the container | ||
|
||
## [1.6.0] - 2023-09-20 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.1 and 5.8.0 jdk11 | ||
|
||
## [1.5.0] - 2023-08-07 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.0 | ||
|
||
## [1.4.0] - 2023-08-07 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.0 jdk11 | ||
|
||
## [1.3.0] - 2023-03-10 | ||
### Added | ||
- Add Dockerfile for sdk 5.6.2 jdk11 | ||
- Add Dockerfile for sdk 5.7.0 and 5.7.0-jdk11 based on 5.6.2 | ||
|
||
## [1.2.0] - 2022-09-06 | ||
### Added | ||
- Add Dockerfile for sdk 5.6.2 based on 5.5.0 | ||
|
||
--- | ||
_Markdown_ | ||
_Copyright 2024 MicroEJ Corp. All rights reserved._ | ||
_Use of this source code is governed by a BSD-style license that can be found with this software._ |
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,101 @@ | ||
# Dockerfile | ||
# | ||
# Copyright 2024 MicroEJ Corp. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be found with this software. | ||
FROM eclipse-temurin:11-jammy | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
lsb-release && \ | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
git \ | ||
unzip \ | ||
udev \ | ||
docker-ce-cli \ | ||
ssh \ | ||
sshpass \ | ||
# Required for Eclipse-based SDK to run | ||
libwebkit2gtk-4.1-0 && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
# Set the new user parameter. | ||
ARG user=microej | ||
ARG group=microej | ||
ARG uid=1000 | ||
ARG gid=1000 | ||
RUN addgroup --gid ${gid} ${group} && \ | ||
adduser --home /home/${user} --uid ${uid} --ingroup ${group} --disabled-password ${user} | ||
|
||
# Set env | ||
ENV HOME /home/${user} | ||
ENV ECLIPSE_HOME=/opt/eclipse | ||
ENV BUILD_KIT_HOME=/opt/buildKit | ||
ENV PATH=$BUILD_KIT_HOME/bin:$PATH | ||
|
||
# Set workdir | ||
WORKDIR ${HOME} | ||
|
||
# I) Install SDK | ||
ARG SDK_DISTRIBUTION_BASE_URL | ||
ARG SDK_DISTRIBUTION_TOKEN | ||
RUN curl -f -H "X-JFrog-Art-Api:${SDK_DISTRIBUTION_TOKEN}" -O https://repository.microej.com/packages/SDK/24.01/zip/microej-sdk-24.01-linux_x86_64.zip && \ | ||
mkdir -p $ECLIPSE_HOME && \ | ||
unzip microej-sdk-24.01-linux_x86_64.zip -d $ECLIPSE_HOME && \ | ||
rm -f microej-sdk-24.01-linux_x86_64.zip && \ | ||
# II) Configure SDK location | ||
mkdir -p $HOME/.microej && \ | ||
chown $user:$group $HOME/.microej && \ | ||
echo "[options]\neclipse.home=\"${ECLIPSE_HOME}\"" > $HOME/.microej/.mmmconfig && \ | ||
# III) Update SDK to 5.9.0 | ||
# 1. Uninstall SDK 5.8.0 | ||
$ECLIPSE_HOME/MicroEJ-SDK \ | ||
-application org.eclipse.equinox.p2.director \ | ||
-noSplash \ | ||
-uninstallIU \ | ||
com.is2t.microej.sdk.feature.feature.group && \ | ||
# 3. Install SDK 5.9.0 | ||
$ECLIPSE_HOME/MicroEJ-SDK \ | ||
-application org.eclipse.equinox.p2.director \ | ||
-noSplash \ | ||
-repository \ | ||
https://repository.microej.com/p2/sdk/5.9.0 \ | ||
-installIUs \ | ||
com.is2t.microej.sdk.feature.feature.group && \ | ||
# IV) Extract Build Kit from SDK | ||
mkdir -p $BUILD_KIT_HOME && \ | ||
# 1. Extract build repository | ||
unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e.offlinerepo_1.6.1.202407231634.jar repositories/microej-build-repository.zip && \ | ||
unzip repositories/microej-build-repository.zip -d $BUILD_KIT_HOME/microej-build-repository && \ | ||
rm -rf repositories/ && \ | ||
# 2. Extract mmm-cli | ||
unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e_2.8.2.202407231634.jar cli/mmm-cli.zip && \ | ||
unzip cli/mmm-cli.zip -d $BUILD_KIT_HOME/ && \ | ||
rm -rf cli && \ | ||
# 3. Extract ivysettings | ||
unzip $ECLIPSE_HOME/plugins/org.apache.ivyde.eclipse_2.5.1.final-202401300921-RELEASE/ivyde-eclipse.jar resources/microej-ivysettings-5.4.xml && \ | ||
mkdir -p $BUILD_KIT_HOME/microej-module-repository/ && \ | ||
mv resources/microej-ivysettings-5.4.xml $BUILD_KIT_HOME/microej-module-repository/ivysettings.xml && \ | ||
rm -rf resources/ && \ | ||
# 4. Set SDK version | ||
echo 'sdk.version=5.9.0' > $BUILD_KIT_HOME/release.properties && \ | ||
mkdir -p $HOME/.microej/build-repository-cache && \ | ||
ln -s $HOME/.microej/build-repository-cache $BUILD_KIT_HOME/microej-build-repository/cache && \ | ||
chown $user:$group $BUILD_KIT_HOME/microej-build-repository/cache | ||
|
||
|
||
ADD ./run.sh /run.sh | ||
RUN chmod a+x /run.sh | ||
|
||
# Good practice, switch back to user. | ||
USER ${user} | ||
|
||
ENTRYPOINT ["/run.sh"] |
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,3 @@ | ||
#!/bin/bash | ||
|
||
docker build --build-arg SDK_DISTRIBUTION_BASE_URL=$SDK_DISTRIBUTION_BASE_URL --build-arg SDK_DISTRIBUTION_TOKEN=$SDK_DISTRIBUTION_TOKEN -t $IMAGE_NAME . |
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,23 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright 2024 MicroEJ Corp. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be found with this software. | ||
# | ||
|
||
set -e | ||
|
||
if [ "$ACCEPT_MICROEJ_SDK_EULA_V3_1B" != "yes" ] && [ "$ACCEPT_MICROEJ_SDK_EULA_V3_1B" != "YES" ] | ||
then | ||
echo "" | ||
echo "##############################################################" | ||
echo "##### The MICROEJ SDK End-User License Agreement (EULA) must be accepted before it can start." | ||
echo "##### The license terms for this product can be downloaded from " | ||
echo "##### https://repository.microej.com/licenses/sdk/LAW-0011-LCS-MicroEJ_SDK-EULA-v3.1B.txt" | ||
echo "##### You can accept the EULA by setting the ACCEPT_MICROEJ_SDK_EULA_V3_1B=YES environment variable" | ||
echo "##############################################################" | ||
echo "" | ||
exit -1 | ||
fi | ||
|
||
exec "$@" |
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,51 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.9.0] - 2024-07-26 | ||
### Added | ||
- Add Dockerfile for sdk 5.9.0 and 5.9.0 jdk11 | ||
|
||
## [1.8.1] - 2024-04-25 | ||
### Fixed | ||
- Fix License check failed when USB dongle is used with MicroEJ Architecture lower than v7.18.1 | ||
|
||
## [1.8.0] - 2024-02-09 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.2 and 5.8.2 jdk11 | ||
|
||
## [1.7.1] - 2023-10-18 | ||
### Changed | ||
- Add build hooks for Dockerhub | ||
|
||
## [1.7.0] - 2023-10-18 | ||
### Changed | ||
- Add EULA acceptation check when starting the container | ||
|
||
## [1.6.0] - 2023-09-20 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.1 and 5.8.0 jdk11 | ||
|
||
## [1.5.0] - 2023-08-07 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.0 | ||
|
||
## [1.4.0] - 2023-08-07 | ||
### Added | ||
- Add Dockerfile for sdk 5.8.0 jdk11 | ||
|
||
## [1.3.0] - 2023-03-10 | ||
### Added | ||
- Add Dockerfile for sdk 5.6.2 jdk11 | ||
- Add Dockerfile for sdk 5.7.0 and 5.7.0-jdk11 based on 5.6.2 | ||
|
||
## [1.2.0] - 2022-09-06 | ||
### Added | ||
- Add Dockerfile for sdk 5.6.2 based on 5.5.0 | ||
|
||
--- | ||
_Markdown_ | ||
_Copyright 2021-2024 MicroEJ Corp. All rights reserved._ | ||
_Use of this source code is governed by a BSD-style license that can be found with this software._ |
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,108 @@ | ||
# Dockerfile | ||
# | ||
# Copyright 2024 MicroEJ Corp. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be found with this software. | ||
FROM eclipse-temurin:8-jammy | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
lsb-release && \ | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
git \ | ||
unzip \ | ||
udev \ | ||
docker-ce-cli \ | ||
ssh \ | ||
sshpass \ | ||
# Required for Eclipse-based SDK to run | ||
libwebkit2gtk-4.1-0 && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
# Set the new user parameter. | ||
ARG user=microej | ||
ARG group=microej | ||
ARG uid=1000 | ||
ARG gid=1000 | ||
RUN addgroup --gid ${gid} ${group} && \ | ||
adduser --home /home/${user} --uid ${uid} --ingroup ${group} --disabled-password ${user} | ||
|
||
# Set env | ||
ENV HOME /home/${user} | ||
ENV ECLIPSE_HOME=/opt/eclipse | ||
ENV BUILD_KIT_HOME=/opt/buildKit | ||
ENV PATH=$BUILD_KIT_HOME/bin:$PATH | ||
|
||
# Remove Java security "SHA1 denyAfter 2019-01-01" from "jdk.jar.disabledAlgorithms" property to avoid | ||
# "License check failed [tampered (3)])" error message when MicroEJ dongle used on old MicroEJ Architecture | ||
RUN sed -i 's/SHA1 denyAfter 2019-01-01,//g' /opt/java/openjdk/jre/lib/security/java.security | ||
|
||
# Set workdir | ||
WORKDIR ${HOME} | ||
|
||
## I) Install SDK | ||
ARG SDK_DISTRIBUTION_BASE_URL | ||
ARG SDK_DISTRIBUTION_TOKEN | ||
RUN curl -f -H "X-JFrog-Art-Api:${SDK_DISTRIBUTION_TOKEN}" -O ${SDK_DISTRIBUTION_BASE_URL}/21.11/microej-sdk-21.11-linux_x86_64.zip && \ | ||
mkdir -p $ECLIPSE_HOME && \ | ||
unzip microej-sdk-21.11-linux_x86_64.zip -d $ECLIPSE_HOME && \ | ||
rm -f microej-sdk-21.11-linux_x86_64.zip && \ | ||
# II) Configure SDK location | ||
mkdir -p $HOME/.microej && \ | ||
chown $user:$group $HOME/.microej && \ | ||
echo "[options]\neclipse.home=\"${ECLIPSE_HOME}\"" > $HOME/.microej/.mmmconfig && \ | ||
# III) Update SDK to 5.9.0 | ||
# 1. Uninstall SDK 5.6.0 | ||
$ECLIPSE_HOME/MicroEJ-SDK \ | ||
-application org.eclipse.equinox.p2.director \ | ||
-noSplash \ | ||
-uninstallIU \ | ||
com.is2t.microej.sdk.feature.feature.group && \ | ||
# 2. Remove plugins with multiple versions | ||
rm -rf $ECLIPSE_HOME/plugins/com.is2t.microej.wadapps.workbench_3.8.0.20201030-1117.jar && \ | ||
rm -rf $ECLIPSE_HOME/plugins/com.is2t.microEJ.fontGenerator_2.5.1.20211112-1727.jar && \ | ||
# 3. Install SDK 5.9.0 | ||
$ECLIPSE_HOME/MicroEJ-SDK \ | ||
-application org.eclipse.equinox.p2.director \ | ||
-noSplash \ | ||
-repository \ | ||
https://repository.microej.com/p2/sdk/5.9.0 \ | ||
-installIUs \ | ||
com.is2t.microej.sdk.feature.feature.group && \ | ||
# IV) Extract Build Kit from SDK | ||
mkdir -p $BUILD_KIT_HOME && \ | ||
# 1. Extract build repository | ||
unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e.offlinerepo_1.6.1.202407231634.jar repositories/microej-build-repository.zip && \ | ||
unzip repositories/microej-build-repository.zip -d $BUILD_KIT_HOME/microej-build-repository && \ | ||
rm -rf repositories/ && \ | ||
# 2. Extract mmm-cli | ||
unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e_2.8.2.202407231634.jar cli/mmm-cli.zip && \ | ||
unzip cli/mmm-cli.zip -d $BUILD_KIT_HOME/ && \ | ||
rm -rf cli && \ | ||
# 3. Extract ivysettings | ||
unzip $ECLIPSE_HOME/plugins/org.apache.ivyde.eclipse_2.5.1.final-202401300921-RELEASE/ivyde-eclipse.jar resources/microej-ivysettings-5.4.xml && \ | ||
mkdir -p $BUILD_KIT_HOME/microej-module-repository/ && \ | ||
mv resources/microej-ivysettings-5.4.xml $BUILD_KIT_HOME/microej-module-repository/ivysettings.xml && \ | ||
rm -rf resources/ && \ | ||
# 4. Set SDK version | ||
echo 'sdk.version=5.9.0' > $BUILD_KIT_HOME/release.properties && \ | ||
mkdir -p $HOME/.microej/build-repository-cache && \ | ||
ln -s $HOME/.microej/build-repository-cache $BUILD_KIT_HOME/microej-build-repository/cache && \ | ||
chown $user:$group $BUILD_KIT_HOME/microej-build-repository/cache | ||
|
||
|
||
ADD ./run.sh /run.sh | ||
RUN chmod a+x /run.sh | ||
|
||
# Good practice, switch back to user. | ||
USER ${user} | ||
|
||
ENTRYPOINT ["/run.sh"] |
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,3 @@ | ||
#!/bin/bash | ||
|
||
docker build --build-arg SDK_DISTRIBUTION_BASE_URL=$SDK_DISTRIBUTION_BASE_URL --build-arg SDK_DISTRIBUTION_TOKEN=$SDK_DISTRIBUTION_TOKEN -t $IMAGE_NAME . |
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,23 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright 2024 MicroEJ Corp. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be found with this software. | ||
# | ||
|
||
set -e | ||
|
||
if [ "$ACCEPT_MICROEJ_SDK_EULA_V3_1B" != "yes" ] && [ "$ACCEPT_MICROEJ_SDK_EULA_V3_1B" != "YES" ] | ||
then | ||
echo "" | ||
echo "##############################################################" | ||
echo "##### The MICROEJ SDK End-User License Agreement (EULA) must be accepted before it can start." | ||
echo "##### The license terms for this product can be downloaded from " | ||
echo "##### https://repository.microej.com/licenses/sdk/LAW-0011-LCS-MicroEJ_SDK-EULA-v3.1B.txt" | ||
echo "##### You can accept the EULA by setting the ACCEPT_MICROEJ_SDK_EULA_V3_1B=YES environment variable" | ||
echo "##############################################################" | ||
echo "" | ||
exit -1 | ||
fi | ||
|
||
exec "$@" |
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