Test in debian 9, ubuntu 14.04 and ubuntu 16.04

This commit is contained in:
Paul Montero
2017-09-11 23:50:26 -05:00
parent 7b20b622b3
commit 37b4d975d3
9 changed files with 110 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
FROM debian:8
WORKDIR /opt/
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
@@ -15,6 +15,7 @@ RUN apt-get update && \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/
COPY build /opt/build
RUN bash build

View File

@@ -0,0 +1,14 @@
FROM debian:9
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
gpg \
python \
sudo \
systemd \
&& rm -rf /var/lib/apt/lists/*
CMD ["/bin/systemd"]

View File

@@ -0,0 +1,22 @@
FROM ubuntu:14.04
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
build-essential \
libbz2-dev \
libffi-dev \
libncurses5-dev \
libreadline-dev \
libssl-dev \
sudo \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/
COPY build /opt/build
RUN bash build
CMD ["/sbin/init"]

View File

@@ -0,0 +1,42 @@
#!/usr/bin/env bash
PI=/opt
EXPECTED_VERSION="2.7.10"
get_source(){
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
tar xvf Python-2.7.10.tar.xz
cd Python-2.7.10
}
install_configure(){
./configure
make
make install
}
remove(){
rm $PI/Python-2.7.10.tar.xz
rm -rf $PI/Python-2.7.10
}
update_alternatives(){
update-alternatives --install /usr/bin/python python /usr/local/bin/python 10
}
version(){
VERSION=$(python -c "print __import__('sys').version[0:6]")
if [ "$VERSION" == "$EXPECTED_VERSION" ];
then echo "Python $VERSION installed OK";
else echo "FAIL";
fi
}
cd $PI
get_source
install_configure
update_alternatives
remove
version

View File

@@ -0,0 +1,12 @@
FROM ubuntu:16.04
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
python \
sudo \
&& rm -rf /var/lib/apt/lists/*
CMD ["/sbin/init"]