Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

did not delete in original areas #1

Closed
wants to merge 17 commits into from
45 changes: 45 additions & 0 deletions libnss-aad/docker/amazon/2018.03/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM amazonlinux:2018.03
outzhu marked this conversation as resolved.
Show resolved Hide resolved

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \
&& yum update -y && yum group install -y 'Development Tools' \
&& yum install -y \
autopoint \
cmake \
git \
indent \
libcurl-devel \
jansson-devel \
pam-devel \
openssl-devel

WORKDIR /tmp
RUN git clone https://github.com/benmcollins/libjwt && \
cd libjwt && git checkout tags/v1.10.1 && \
autoreconf -i && ./configure && make && make install

# See: https://github.com/antirez/sds/issues/97
WORKDIR /tmp
RUN git clone https://github.com/antirez/sds libsds && \
cd libsds && git checkout tags/2.0.0 && \
echo "typedef int sdsvoid;" >> sdsalloc.h && \
gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \
-Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \
sds.c sds.h sdsalloc.h && \
cp -a libsds.so.2.0.0 /usr/local/lib/ && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \
mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/

WORKDIR /tmp
RUN git clone https://github.com/jedisct1/libsodium && \
cd libsodium && git checkout tags/1.0.17 && \
./autogen.sh && ./configure && make && make check && make install

WORKDIR /usr/src/libnss_aad
COPY . /usr/src/libnss_aad
RUN git submodule update --init --recursive && \
cd linux-pam && git checkout tags/Linux-PAM-1_1_8 && \
./autogen.sh && ./configure --disable-regenerate-docu && \
cd .. && patch linux-pam/modules/pam_unix/passverify.c \
.patches/0001-Remove-static-keyword-from-crypt_make_salt.patch && \
LIB_DIR=/lib64 make -e install
39 changes: 39 additions & 0 deletions libnss-aad/docker/amazon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum update -y && yum group install -y 'Development Tools' \
&& yum install -y \
autopoint \
cmake \
git \
indent \
libcurl-devel \
jansson-devel \
pam-devel \
openssl-devel

WORKDIR /tmp
RUN git clone https://github.com/benmcollins/libjwt && \
cd libjwt && git checkout tags/v1.10.1 && \
autoreconf -i && ./configure && make && make install

# See: https://github.com/antirez/sds/issues/97
WORKDIR /tmp
RUN git clone https://github.com/antirez/sds libsds && \
cd libsds && git checkout tags/2.0.0 && \
echo "typedef int sdsvoid;" >> sdsalloc.h && \
gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \
-Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \
sds.c sds.h sdsalloc.h && \
cp -a libsds.so.2.0.0 /usr/local/lib/ && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \
mkdir -p /usr/local/include/sds && cp -a sds.h /usr/local/include/sds/

WORKDIR /tmp
RUN git clone https://github.com/jedisct1/libsodium && \
cd libsodium && git checkout tags/1.0.17 && \
./autogen.sh && ./configure && make && make check && make install

WORKDIR /usr/src/libnss_aad
COPY . /usr/src/libnss_aad
RUN make depends && \
LIB_DIR=/lib64 make -e install
39 changes: 39 additions & 0 deletions libnss-aad/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM debian:9.7
outzhu marked this conversation as resolved.
Show resolved Hide resolved
ARG VERSION
ARG DEBVER

RUN echo "deb http://http.us.debian.org/debian sid main" \
outzhu marked this conversation as resolved.
Show resolved Hide resolved
>> /etc/apt/sources.list && \
apt update && apt install -y \
automake \
autopoint \
build-essential \
cmake \
curl \
debhelper \
devscripts \
git \
indent \
libcurl4-openssl-dev \
libjansson-dev \
libjwt-dev \
libsodium-dev \
libssl-dev \
libtool \
libxcrypt-dev \
pkg-config \
quilt

ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \
SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1"
WORKDIR /tmp
RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb"

WORKDIR /usr/src/libnss_aad
COPY . /usr/src/libnss_aad
RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -i'.git' && \
dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb"
70 changes: 70 additions & 0 deletions libnss-aad/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
FROM ubuntu:18.04
outzhu marked this conversation as resolved.
Show resolved Hide resolved
ARG VERSION
ARG DEBVER

RUN echo "deb http://http.us.debian.org/debian sid main" \
outzhu marked this conversation as resolved.
Show resolved Hide resolved
>> /etc/apt/sources.list && \
apt update && apt install -y \
automake \
autopoint \
build-essential \
cmake \
curl \
debhelper \
devscripts \
git \
indent \
libcurl4-openssl-dev \
libjansson-dev \
libjwt-dev \
libsodium-dev \
libssl-dev \
libtool \
libxcrypt-dev \
pkg-config \
quilt

ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \
SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1"
WORKDIR /tmp
RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb"

WORKDIR /usr/src/libnss_aad
COPY . /usr/src/libnss_aad
RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -i'.git' && \
dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb"
RUN apt update && apt install -y \
software-properties-common && \
add-apt-repository -y ppa:lramage/sds && \
add-apt-repository -y ppa:jnchi/ppa

RUN apt update && apt install -y \
automake \
autopoint \
build-essential \
cmake \
curl \
debhelper \
devscripts \
git \
indent \
libcurl4-openssl-dev \
libjansson-dev \
libjwt-dev \
libsds-dev \
libsodium-dev \
libssl-dev \
libtool \
libxcrypt-dev \
pkg-config \
quilt

WORKDIR /usr/src/libnss_aad
COPY . /usr/src/libnss_aad
RUN tar cvzf "../libnss-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -i'.git' && \
dpkg -i "../libnss-aad_${VERSION}-${DEBVER}_amd64.deb"
19 changes: 19 additions & 0 deletions openvpn-auth-aad/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM aad-for-linux/pam_aad:debian
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename this too, e.g., openvpn_auth_aad/debian/Dockerfile

ARG VERSION
ARG DEBVER

RUN apt-get update -qq && apt-get install -y \
liblz4-dev \
liblzo2-dev \
openvpn \
wget

WORKDIR /usr/src/openvpn-auth-aad
COPY . /usr/src/openvpn-auth-aad
RUN useradd -m dev -s /bin/bash && \
chown -R dev:dev /usr/src/openvpn-auth-aad

RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -d -i'(.*)' && \
dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb"

19 changes: 19 additions & 0 deletions openvpn-auth-aad/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM aad-for-linux/pam_aad:ubuntu
outzhu marked this conversation as resolved.
Show resolved Hide resolved
ARG VERSION
ARG DEBVER

RUN apt-get update -qq && apt-get install -y \
liblz4-dev \
liblzo2-dev \
openvpn \
wget

WORKDIR /usr/src/openvpn-auth-aad
COPY . /usr/src/openvpn-auth-aad
RUN useradd -m dev -s /bin/bash && \
chown -R dev:dev /usr/src/openvpn-auth-aad

RUN tar cvzf "../openvpn-auth-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -d -i'(.*)' && \
dpkg -i "../openvpn-auth-aad_${VERSION}-${DEBVER}_amd64.deb"

40 changes: 40 additions & 0 deletions pam_aad/docker/amazon/2018.03/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM amazonlinux:2018.03
outzhu marked this conversation as resolved.
Show resolved Hide resolved

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \
&& yum update -y && yum group install -y 'Development Tools' \
&& yum install -y \
git \
indent \
libcurl-devel \
jansson-devel \
pam-devel \
openssl-devel \
libuuid-devel

WORKDIR /tmp
RUN git clone https://github.com/benmcollins/libjwt && \
cd libjwt && git checkout tags/v1.10.1 && \
autoreconf -i && ./configure && make && make install

# See: https://github.com/antirez/sds/issues/97
WORKDIR /tmp
RUN git clone https://github.com/antirez/sds libsds && \
cd libsds && git checkout tags/2.0.0 && \
echo "typedef int sdsvoid;" >> sdsalloc.h && \
gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \
-Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \
sds.c sds.h sdsalloc.h && \
cp -a libsds.so.2.0.0 /usr/local/lib/ && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \
ldconfig && mkdir -p /usr/local/include/sds && \
cp -a sds.h /usr/local/include/sds/

WORKDIR /usr/src/pam_aad
COPY . /usr/src/pam_aad

ENV PAMDIR="/lib64/security" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64"
RUN ./bootstrap.sh && \
./configure --with-pam-dir="${PAMDIR}" && \
make && make install
40 changes: 40 additions & 0 deletions pam_aad/docker/amazon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM amazonlinux:2
outzhu marked this conversation as resolved.
Show resolved Hide resolved

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum update -y && yum group install -y 'Development Tools' \
&& yum install -y \
git \
indent \
libcurl-devel \
jansson-devel \
pam-devel \
openssl-devel \
libuuid-devel

WORKDIR /tmp
RUN git clone https://github.com/benmcollins/libjwt && \
cd libjwt && git checkout tags/v1.10.1 && \
autoreconf -i && ./configure && make && make install

# See: https://github.com/antirez/sds/issues/97
WORKDIR /tmp
RUN git clone https://github.com/antirez/sds libsds && \
cd libsds && git checkout tags/2.0.0 && \
echo "typedef int sdsvoid;" >> sdsalloc.h && \
gcc -fPIC -fstack-protector -std=c99 -pedantic -Wall \
-Werror -shared -o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 \
sds.c sds.h sdsalloc.h && \
cp -a libsds.so.2.0.0 /usr/local/lib/ && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so && \
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2 && \
ldconfig && mkdir -p /usr/local/include/sds && \
cp -a sds.h /usr/local/include/sds/

WORKDIR /usr/src/pam_aad
COPY . /usr/src/pam_aad

ENV PAMDIR="/lib64/security" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64"
RUN ./bootstrap.sh && \
./configure --with-pam-dir="${PAMDIR}" && \
make && make install
37 changes: 37 additions & 0 deletions pam_aad/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM debian:9.7
outzhu marked this conversation as resolved.
Show resolved Hide resolved
ARG VERSION
ARG DEBVER

RUN echo "deb http://http.us.debian.org/debian sid main" \
outzhu marked this conversation as resolved.
Show resolved Hide resolved
>> /etc/apt/sources.list && \
apt update && apt install -y \
automake \
build-essential \
curl \
debhelper \
devscripts \
git \
indent \
libcurl4-openssl-dev \
libjansson-dev \
libjwt-dev \
libpam0g-dev \
libssl-dev \
libtool \
pkg-config \
quilt \
uuid-dev

ENV SDSMIRROR="https://gitlab.com/oxr463/sds/-/jobs/210491217/artifacts/raw" \
SDSVERSION="2.0.0" SDSDEBVERSION="2.0.0-1"
WORKDIR /tmp
RUN curl -LO "${SDSMIRROR}/libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
curl -LO "${SDSMIRROR}/libsds-dev_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds${SDSVERSION}_${SDSDEBVERSION}_amd64.deb" && \
dpkg -i "libsds-dev_${SDSDEBVERSION}_amd64.deb"

WORKDIR /usr/src/pam_aad
COPY . /usr/src/pam_aad
RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -d -i'(.*)' && \
dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb"
32 changes: 32 additions & 0 deletions pam_aad/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:18.04
outzhu marked this conversation as resolved.
Show resolved Hide resolved
ARG VERSION
ARG DEBVER

RUN apt update && apt install -y \
software-properties-common && \
add-apt-repository -y ppa:lramage/sds

RUN apt update && apt install -y \
automake \
build-essential \
curl \
debhelper \
devscripts \
git \
indent \
libcurl4-openssl-dev \
libjansson-dev \
libjwt-dev \
libpam0g-dev \
libsds-dev \
libssl-dev \
libtool \
pkg-config \
quilt \
uuid-dev

WORKDIR /usr/src/pam_aad
COPY . /usr/src/pam_aad
RUN tar cvzf "../pam-aad_${VERSION}.orig.tar.gz" --exclude='.git*' . && \
debuild -us -uc -d -i'(.*)' && \
dpkg -i "../libpam-aad_${VERSION}-${DEBVER}_amd64.deb"