Skip to content

Commit

Permalink
Upate docker image to Ubuntu 24.04 & Java 11
Browse files Browse the repository at this point in the history
Builds and init command works. Need to add more tests
  • Loading branch information
MrCreosote committed Dec 19, 2024
1 parent fd93521 commit 4bbfd98
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 21 deletions.
56 changes: 35 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
FROM ubuntu:14.04
MAINTAINER Shane Canon <[email protected]>
FROM eclipse-temurin:11.0.25_9-jdk-noble

# Update apt and install jdk and docker engine to get docker clients
RUN apt-get -y update && \
apt-get -y install openjdk-7-jdk make git ant && \
apt-get -y install apt-transport-https ca-certificates && \
apt-key adv \
--keyserver hkp://ha.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list && \
apt-get -y update && apt-get -y install docker-engine=1.11.2-0~trusty
# Note if you update ubuntu the install lines below will need to be changed
ENV CONTAINERD_VER=1.7.24-1
ENV DOCKER_VER=27.4.1-1
ENV DOCKER_BX_VER=0.19.3-1
ENV DOCKER_COMPOSE_VER=2.32.1-1

ADD . /src
RUN apt update && apt install -y wget ant make git iptables

# Add kb_sdk src and fix CallbackServer interface
RUN \
cd /src && \
sed -i 's/en0/eth0/' src/java/us/kbase/common/executionengine/CallbackServer.java && \
make && \
/src/entrypoint prune && rm -rf /src/.git
# install jars
# TODO GRADLE remove when switching to Gradle
RUN cd /opt && git clone https://github.com/kbase/jars.git

ENV PATH=$PATH:/src/bin
# install docker

ENTRYPOINT [ "/src/entrypoint" ]
RUN DL=https://download.docker.com/linux/ubuntu/dists/noble/pool/stable/amd64 \
&& CD=containerd.io_${CONTAINERD_VER}_amd64.deb \
&& DCE=docker-ce_${DOCKER_VER}~ubuntu.24.04~noble_amd64.deb \
&& DCEC=docker-ce-cli_${DOCKER_VER}~ubuntu.24.04~noble_amd64.deb \
&& BX=docker-buildx-plugin_${DOCKER_BX_VER}~ubuntu.24.04~noble_amd64.deb \
&& DCM=docker-compose-plugin_${DOCKER_COMPOSE_VER}~ubuntu.24.04~noble_amd64.deb \
&& wget -q $DL/$CD \
&& wget -q $DL/$DCE \
&& wget -q $DL/$DCEC \
&& wget -q $DL/$BX \
&& wget -q $DL/$DCM \
&& dpkg -i $CD $DCE $DCEC $BX $DCM \
&& rm $CD $DCE $DCEC $BX $DCM

CMD [ ]
ADD . /opt/kb_sdk

# Fix CallbackServer interface
RUN cd /opt/kb_sdk \
&& sed -i 's/en0/eth0/' src/java/us/kbase/common/executionengine/CallbackServer.java \
&& make \
&& rm -rf /src/.git

ENV PATH=$PATH:/opt/kb_sdk/bin

ENTRYPOINT [ "/opt/kb_sdk/entrypoint" ]
1 change: 1 addition & 0 deletions src/java/us/kbase/mobu/tester/test/ModuleTesterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class ModuleTesterTest {

// TODO TEST move the modules into a single test directory for easy deletion
// TODO TEST fix tests leaving root owned files on disk
// TODO TEST fix tests leaving images and containers lying around

private static final String SIMPLE_MODULE_NAME = "ASimpleModule_for_unit_testing";
private static final boolean CLEANUP_AFTER_TESTS = true;
Expand Down

0 comments on commit 4bbfd98

Please sign in to comment.