Merge branch 'new-docker-images'

This commit is contained in:
Robin Dunn
2020-04-21 17:03:14 -07:00
3 changed files with 197 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
# The base image
FROM centos:8
# Set environment variables
ENV DIST_NAME=centos-8
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
# Update and install basic OS packages
RUN \
# yum -y install https://centos8.iuscommunity.org/ius-release.rpm; \
# yum install \
# https://repo.ius.io/ius-release-el8.rpm \
# https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm; \
# dnf config-manager --set-enabled PowerTools; \
yum -y update; \
yum -y group install development; \
yum -y install sudo nano which; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser -m ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
yum -y install \
freeglut-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk3-devel \
libjpeg-turbo-devel \
libnotify \
libnotify-devel \
libpng-devel \
libSM-devel \
libtiff-devel \
libXtst-devel \
SDL-devel \
webkit2gtk3-devel; \
# Install all available Python packages and their dev packages
yum -y install python3 python3-tools python3-devel; \
# CLean up the yum caches
yum clean all;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python3.6 -m venv venvs/Py36;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,60 @@
# The base image
FROM fedora:31
# Set environment variables
ENV DIST_NAME=fedora-31
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
# Update and install basic OS packages
RUN \
dnf -y update; \
dnf -y group install "Development Tools"; \
dnf -y install gcc-c++ sudo nano which; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser -m ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
dnf install -y \
freeglut-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk3-devel \
libjpeg-turbo-devel \
libnotify-devel \
libpng-devel \
libSM-devel \
libtiff-devel \
libXtst-devel \
SDL-devel \
webkit2gtk3-devel; \
# Install all available Python packages and their dev packages
dnf -y install python3 python3-tools python3-devel; \
dnf -y install python38; \
# CLean up dnf caches
dnf clean all;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python3.7 -m venv venvs/Py37; \
python3.8 -m venv venvs/Py38
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,73 @@
# The base image (v20.04 == "focal")
FROM ubuntu:20.04
# Set environment variables
ENV DIST_NAME=ubuntu-20.04
ENV USE_DEADSNAKES=no
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
ENV DEBIAN_FRONTEND=noninteractive
# Update and install basic OS packages
RUN \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
sudo nano; \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections; \
# Set up a user, and sudo
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Set a timezone
apt-get install -y tzdata; \
ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime; \
dpkg-reconfigure -f noninteractive tzdata; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkit2gtk-4.0-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
if [ ${USE_DEADSNAKES} = yes ]; then add-apt-repository ppa:deadsnakes/ppa; apt-get update; fi; \
apt-get install -y python3.8 python3.8-dev libpython3.8-dev python3.8-venv; \
apt-get clean;
# Add files from host into the container
COPY scripts ${HOME}/bin
RUN chown -R ${USER}:${USER} ${HOME}/bin
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python3.8 -m venv venvs/Py38;
# Define default command
CMD ["/bin/bash", "-l"]