Skip to content

Commit

Permalink
rt env updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov committed Jan 17, 2024
1 parent cde801e commit 34ee9cd
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
env
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
docker build --squash --tag septimalmind/izumi-env:latest --tag septimalmind/izumi-env:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env:${GITHUB_SHA} izumi-env
docker build --squash --tag septimalmind/izumi-env:latest --tag septimalmind/izumi-env:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env:${GITHUB_SHA} izumi-env-build
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push septimalmind/izumi-env:latest
docker push septimalmind/izumi-env:${GITHUB_REF_SLUG}
docker push septimalmind/izumi-env:${GITHUB_SHA}
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env:${BRANCH_TAGYt} ; fi
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env:${BRANCH_TAG} ; fi
build-light:
runs-on: ubuntu-latest
Expand All @@ -53,9 +53,9 @@ jobs:
env
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
docker build --squash --tag septimalmind/izumi-env-light:latest --tag septimalmind/izumi-env-light:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env-light:${GITHUB_SHA} izumi-env-light
docker build --squash --tag septimalmind/izumi-env-light:latest --tag septimalmind/izumi-env-light:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env-light:${GITHUB_SHA} izumi-env-runtime
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push septimalmind/izumi-env-light:latest
docker push septimalmind/izumi-env-light:${GITHUB_REF_SLUG}
docker push septimalmind/izumi-env-light:${GITHUB_SHA}
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env-light:${BRANCH_TAGYt} ; fi
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env-light:${BRANCH_TAG} ; fi
40 changes: 22 additions & 18 deletions izumi-env/Dockerfile → izumi-env-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
ARG V_UBUNTU=22.04
FROM ubuntu:${V_UBUNTU}

ARG URELEASE=jammy

#ARG V_OPENJDK=11
ARG V_GRAAL=21.0.1
###
ARG V_GRAAL=21.0.2
ARG V_SCALA=2.13.12
ARG V_SBT=1.9.8

Expand All @@ -14,37 +13,40 @@ ARG V_DOTNETSDK=7.0
ARG V_MVN=3.6.3-5
ARG V_PROTOBUF=25.1
ARG V_JEKYLL=3.2.1
###

# basic configuration
RUN mkdir -p /work
RUN mkdir -p /root
VOLUME /work
VOLUME /root
WORKDIR /work

ENV DEBIAN_FRONTEND noninteractive
RUN echo "APT::Acquire::Queue-Mode "access"; APT::Acquire::Retries 3; " > /etc/apt/apt.conf.d/99parallel

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN echo "APT::Acquire::Queue-Mode "access"; APT::Acquire::Retries 3; " > /etc/apt/apt.conf.d/99parallel && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && apt-get install -y --no-install-recommends tzdata gnupg ca-certificates wget curl zip unzip apt-utils jq build-essential git openssh-client software-properties-common locales && \
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata && \
apt-get clean -y
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y --no-install-recommends tzdata gnupg ca-certificates wget curl zip unzip apt-utils jq openssh-client software-properties-common

RUN apt-get -y --no-install-recommends install locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
# end: basic configuration

# sources
RUN curl -o packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb

RUN add-apt-repository ppa:longsleep/golang-backports



RUN curl -sS https://download.mono-project.com/repo/xamarin.gpg | apt-key add - && \
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list

Expand All @@ -65,6 +67,8 @@ RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E4
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list

RUN apt-get update && apt-get upgrade -y
# end: sources


# we don't need it but it fixes broken apt
#RUN apt-get install -y openjdk-21-jre-headless
Expand Down Expand Up @@ -92,14 +96,11 @@ RUN apt-get install -y --no-install-recommends \
RUN apt-get install -y --no-install-recommends \
maven=${V_MVN}

#ant
#openjdk-${V_OPENJDK}-jdk

RUN apt-get install -y --no-install-recommends \
ruby ruby-dev

RUN apt-get clean -y

# java
ARG JAVA_BASE=/usr/lib/jvm
ENV JAVA_HOME ${JAVA_BASE}/graalvm
ENV PATH "$PATH:$JAVA_HOME/bin"
Expand All @@ -112,6 +113,7 @@ RUN cd /tmp && \
chmod -R 755 ${JAVA_BASE} && \
mv graalvm-*/ ${JAVA_HOME} && \
update-alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 99999
# end: java

RUN wget -q www.scala-lang.org/files/archive/scala-${V_SCALA}.deb && dpkg -i --ignore-depends=java8-runtime-headless scala-${V_SCALA}.deb && rm -rf *.deb && \
curl -Lo /usr/local/bin/coursier https://git.io/coursier-cli && chmod +x /usr/local/bin/coursier
Expand Down Expand Up @@ -146,3 +148,5 @@ RUN echo "java: $(java -version)" && \
ENV PB_REL="https://github.com/protocolbuffers/protobuf/releases"
RUN curl -LO $PB_REL/download/v${V_PROTOBUF}/protoc-${V_PROTOBUF}-linux-x86_64.zip && unzip protoc-${V_PROTOBUF}-linux-x86_64.zip -d /usr/proto
RUN mv /usr/proto/bin/protoc /usr/bin/protoc && mv /usr/proto/include /usr/bin/include && chmod +x /usr/bin/protoc

RUN apt-get clean -y
51 changes: 29 additions & 22 deletions izumi-env-light/Dockerfile → izumi-env-runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,62 +1,69 @@
ARG V_UBUNTU=22.04
#ARG URELEASE=jammy
FROM ubuntu:${V_UBUNTU}
ARG URELEASE=jammy

ARG V_GRAAL=22.3.0
ARG V_JAVA=java11

ARG V_DOTNETSDK=6.0
###
ARG V_GRAAL=21.0.2
ARG V_DOTNETSDK=7.0
###

# basic configuration
RUN mkdir -p /work
RUN mkdir -p /root
VOLUME /work
VOLUME /root
WORKDIR /work

ENV DEBIAN_FRONTEND noninteractive
ENV JAVA_HOME ${JAVA_BASE}/graalvm
ENV PATH "$PATH:$JAVA_HOME/bin:/app:/.dotnet/tools"
RUN echo "APT::Acquire::Queue-Mode "access"; APT::Acquire::Retries 3; " > /etc/apt/apt.conf.d/99parallel

RUN apt-get update
RUN apt-get -y install locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN echo "APT::Acquire::Queue-Mode "access"; APT::Acquire::Retries 3; " > /etc/apt/apt.conf.d/99parallel && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && apt-get install -y --no-install-recommends tzdata gnupg ca-certificates wget curl zip unzip apt-utils jq openssh-client software-properties-common && \
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata && \
apt-get upgrade -y && apt-get clean -y
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y --no-install-recommends tzdata gnupg ca-certificates wget curl zip unzip apt-utils jq openssh-client software-properties-common

RUN apt-get -y --no-install-recommends install locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen

RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
# end: basic configuration

# java
ARG JAVA_BASE=/usr/lib/jvm
ENV JAVA_HOME ${JAVA_BASE}/graalvm
ENV PATH "$PATH:$JAVA_HOME/bin"

RUN cd /tmp && \
wget -q https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${V_GRAAL}/graalvm-ce-${V_JAVA}-linux-amd64-${V_GRAAL}.tar.gz -O dist.tar.gz && \
wget -q https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${V_GRAAL}/graalvm-community-jdk-${V_GRAAL}_linux-x64_bin.tar.gz -O dist.tar.gz && \
tar -xvzf dist.tar.gz && \
rm -f dist.tar.gz && \
mkdir -p ${JAVA_BASE} && \
chmod -R 755 ${JAVA_BASE} && \
mv graalvm-*/ ${JAVA_HOME} && \
update-alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 1 && \
gu install nodejs && \
gu install js
update-alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 99999 && \
java --version
# end: java

# dotnet
ENV PATH "$PATH:/.dotnet/tools"

ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
RUN printf 'Package: *\nPin: origin "packages.microsoft.com"\nPin-Priority: 1001' > /etc/apt/preferences.d/99microsoft-dotnet.pref

RUN curl -o packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb

RUN apt-get update && apt-get install -y apt-transport-https dotnet-sdk-${V_DOTNETSDK} aspnetcore-runtime-${V_DOTNETSDK} && apt-get upgrade -y && apt-get clean -y
RUN apt-get update && apt-get install -y apt-transport-https dotnet-sdk-${V_DOTNETSDK} aspnetcore-runtime-${V_DOTNETSDK} && apt-get upgrade -y

RUN dotnet --version && \
dotnet tool install Amazon.Lambda.Tools --tool-path /.dotnet/tools && \
dotnet new -i Amazon.Lambda.Templates
# end: dotnet

ENV PATH "$PATH:/app"
RUN apt-get clean -y

0 comments on commit 34ee9cd

Please sign in to comment.