Skip to content

Commit

Permalink
- new jdk patch
Browse files Browse the repository at this point in the history
- automatic build the docker image with GitHub actions
  • Loading branch information
mmuellerm committed Feb 6, 2022
1 parent 134d576 commit cf2b62d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI

on:
push:
branches: [ master ]

env:
VERSION_TAG: v6.3.11b

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USER }}/openkm-debian-pg:$VERSION_TAG
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Push the Docker image to the Docker Hub
run: docker push ${{ secrets.DOCKER_USER }}/openkm-debian-pg:$VERSION_TAG
- name: Build the Docker image with tag 'latest'
run: docker tag ${{ secrets.DOCKER_USER }}/openkm-debian-pg:$VERSION_TAG ${{ secrets.DOCKER_USER }}/openkm-debian-pg:latest
- name: Push the Docker image with tag 'latest' to the Docker Hub
run: docker push ${{ secrets.DOCKER_USER }}/openkm-debian-pg:latest
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ RUN apt-get install -y build-essential \
patch && \
apt-get clean

RUN wget -O /usr/lib/jvm/jdk-8u311-linux-x64.tar.gz -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u311-b11/4d5417147a92418ea8b615e228bb6935/jdk-8u311-linux-x64.tar.gz && \
tar zxvf /usr/lib/jvm/jdk-8u311-linux-x64.tar.gz --directory /usr/lib/jvm && rm /usr/lib/jvm/jdk-8u311-linux-x64.tar.gz && \
unlink /etc/alternatives/java && ln -s /usr/lib/jvm/jdk1.8.0_311/bin/java /etc/alternatives/java
RUN sed -i 's|<policy domain="coder" rights="none" pattern="PDF" />|<policy domain="coder" rights="read\|write" pattern="PDF" />|' /etc/ImageMagick-6/policy.xml

RUN wget -O /usr/lib/jvm/jdk-8u321-linux-x64.tar.gz -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u321-b07/df5ad55fdd604472a86a45a217032c7d/jdk-8u321-linux-x64.tar.gz && \
tar zxvf /usr/lib/jvm/jdk-8u321-linux-x64.tar.gz --directory /usr/lib/jvm && rm /usr/lib/jvm/jdk-8u321-linux-x64.tar.gz && \
unlink /etc/alternatives/java && ln -s /usr/lib/jvm/jdk1.8.0_321/bin/java /etc/alternatives/java

RUN wget -O /usr/local/swftools-0.9.2.tar.gz http://www.swftools.org/swftools-0.9.2.tar.gz && tar --directory /usr/local --ungzip -xf /usr/local/swftools-0.9.2.tar.gz && rm /usr/local/swftools-0.9.2.tar.gz && \
wget -O /usr/local/swftools-0.9.2/swftools.tar.gz http://aur.archlinux.org/cgit/aur.git/snapshot/swftools.tar.gz && tar --directory /usr/local/swftools-0.9.2 --ungzip -xf /usr/local/swftools-0.9.2/swftools.tar.gz && \
Expand All @@ -45,10 +47,10 @@ ADD extern.patch /usr/local/swftools-0.9.2/extern.patch
RUN mv /usr/local/swftools-0.9.2/swfs/Makefile.in /usr/local/swftools-0.9.2/swfs/Makefile && cd /usr/local/swftools-0.9.2 && patch -Np0 -i giflib-5.1.patch && patch -Np0 -i swftools-0.9.2.patch && patch -Np0 -i extern.patch && \
mv swfs/Makefile swfs/Makefile.in && ./configure && make && make install && cd / && rm -r /usr/local/swftools-0.9.2

ENV PATH="$PATH:/usr/lib/jvm/jdk1.8.0_311/bin"
ENV PATH="$PATH:/usr/lib/jvm/jdk1.8.0_321/bin"
ENV CATALINA_HOME=/usr/local/tomcat
ENV JAVA_HOME=/usr/local/java
ENV OPENJDK_HOME=/usr/lib/jvm/jdk1.8.0_311/
ENV OPENJDK_HOME=/usr/lib/jvm/jdk1.8.0_321/
ENV TOMCAT_HOME="$CATALINA_HOME"

RUN ln -s $OPENJDK_HOME $JAVA_HOME && \
Expand Down

0 comments on commit cf2b62d

Please sign in to comment.