Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for Rocky 8 #125

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions Dockerfile.rocky8
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Build AYON launcher docker image
FROM rockylinux:8 AS builder
ARG PYTHON_VERSION=3.9.13

LABEL description="Docker Image to build and run AYON Launcher under RockyLinux 9"
LABEL org.opencontainers.image.name="ynput/ayon-launcher"
LABEL org.opencontainers.image.title="AYON Launcher Docker Image"
LABEL org.opencontainers.image.url="https://ayon.ynput.io/"
LABEL org.opencontainers.image.source="https://github.com/ynput/ayon-launcher"
LABEL org.opencontainers.image.documentation="https://ayon.ynput.io"
LABEL org.opencontainers.image.created=$BUILD_DATE
LABEL org.opencontainers.image.version=$VERSION


USER root

# update base
RUN dnf install -y dnf-plugins-core \
&& dnf -y update \
&& dnf clean all

# add tools we need
RUN dnf -y install \
bash \
which \
git \
make \
cmake \
wget \
gcc \
zlib-devel \
bzip2 \
bzip2-devel \
readline-devel \
sqlite sqlite-devel \
openssl-devel \
openssl-libs \
tk-devel libffi-devel \
automake \
autoconf \
patch \
ncurses \
ncurses-devel \
xcb-util-wm \
xcb-util-renderutil \
xz-devel \
findutils \
&& dnf clean all

RUN mkdir /opt/ayon-launcher

RUN curl https://pyenv.run | bash
# ENV PYTHON_CONFIGURE_OPTS --enable-shared

RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"'>> $HOME/.bashrc \
&& echo 'eval "$(pyenv init -)"' >> $HOME/.bashrc \
&& echo 'eval "$(pyenv virtualenv-init -)"' >> $HOME/.bashrc \
&& echo 'eval "$(pyenv init --path)"' >> $HOME/.bashrc
RUN source $HOME/.bashrc && pyenv install ${PYTHON_VERSION}

COPY . /opt/ayon-launcher/
RUN rm -rf /opt/ayon-launcher/.poetry || echo "No Poetry installed yet."
RUN chmod +x /opt/ayon-launcher/tools/make.sh

WORKDIR /opt/ayon-launcher

RUN source $HOME/.bashrc \
&& pyenv local ${PYTHON_VERSION}

RUN source $HOME/.bashrc \
&& ./tools/make.sh create-env

RUN source $HOME/.bashrc \
&& ./tools/make.sh install-runtime

RUN source $HOME/.bashrc \
&& bash ./tools/make.sh build-make-installer

RUN cp /usr/lib64/libffi* ./build/output/lib \
&& cp /usr/lib64/libssl* ./build/output/lib \
&& cp /usr/lib64/libcrypto* ./build/output/lib \
&& cp /root/.pyenv/versions/${PYTHON_VERSION}/lib/libpython* ./build/output/lib \
&& cp /usr/lib64/libxcb* ./build/output/lib
2 changes: 1 addition & 1 deletion tools/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ default_help() {
echo " upload Upload installer to server"
echo " create-server-package Create package ready for AYON server"
echo " run Run desktop application from code"
echo " docker-build [variant] Build AYON using Docker. Variant can be 'centos7', 'debian' or 'rocky9'"
echo " docker-build [variant] Build AYON using Docker. Variant can be 'centos7', 'debian', 'rocky8' or 'rocky9'"
echo ""
}

Expand Down
2 changes: 1 addition & 1 deletion tools/manage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function Default-Func {
Write-Color -text " build-make-installer ", "Build desktop application and make installer" -Color White, Cyan
Write-Color -text " upload ", "Upload installer to server" -Color White, Cyan
Write-Color -text " run ", "Run desktop application from code" -Color White, Cyan
Write-Color -text " docker-build ","[variant] ", "Build AYON using Docker. Variant can be '", "centos7", "', '", "ubuntu","', '", "debian", "' or '", "rocky9", "'" -Color White, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan
Write-Color -text " docker-build ","[variant] ", "Build AYON using Docker. Variant can be '", "centos7", "', '", "ubuntu", "', '", "debian", "', '", "rocky8", "' or '", "rocky9", "'" -Color White, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan, Yellow, Cyan
Write-Host ""
}

Expand Down