diff --git a/2.3.8/Dockerfile b/2.3.8/Dockerfile index ca73184..103555a 100644 --- a/2.3.8/Dockerfile +++ b/2.3.8/Dockerfile @@ -1,6 +1,79 @@ -FROM appsvc/rubybase:2.3.8 +FROM buildpack-deps:jessie-curl LABEL maintainer="Azure App Services Container Images " +ENV RUBY_VERSION="2.3.8" + +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + +RUN apt-get update -qq + +# Dependencies for various ruby and rubygem installations +RUN apt-get install -y git --no-install-recommends +RUN apt-get install -y libreadline-dev bzip2 build-essential libssl-dev zlib1g-dev libpq-dev libsqlite3-dev \ + curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev libyaml-dev sqlite3 autoconf \ + libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev bison libxslt-dev \ + libxml2-dev libmysqlclient-dev --no-install-recommends wget + +# rbenv +ENV RBENV_ROOT="/usr/local/.rbenv" +RUN git clone https://github.com/rbenv/rbenv.git $RBENV_ROOT +RUN chmod -R 777 $RBENV_ROOT + +ENV PATH="$RBENV_ROOT/bin:/usr/local:$PATH" + +RUN git clone https://github.com/rbenv/ruby-build.git $RBENV_ROOT/plugins/ruby-build +RUN chmod -R 777 $RBENV_ROOT/plugins/ruby-build + +RUN $RBENV_ROOT/plugins/ruby-build/install.sh + +# Install ruby +ENV RUBY_CONFIGURE_OPTS=--disable-install-doc + +ENV RUBY_CFLAGS=-O3 + +RUN cd $RBENV_ROOT \ + && git pull + +RUN eval "$(rbenv init -)" \ + && rbenv install --force $RUBY_VERSION \ + && rbenv rehash \ + && rbenv global $RUBY_VERSION \ + && ls /usr/local -a \ + && gem install bundler --version "=1.13.6" \ + && chmod -R 777 $RBENV_ROOT/versions \ + && chmod -R 777 $RBENV_ROOT/version + +RUN eval "$(rbenv init -)" \ + && rbenv global $RUBY_VERSION \ + && bundle config --global build.nokogiri -- --use-system-libraries + +# Because Nokogiri tries to build libraries on its own otherwise +ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +# SQL Server gem support +RUN apt-get install -y unixodbc-dev + +# find latest version of FreeTDS ftp://ftp.freetds.org/pub/freetds/stable/ +ENV FREETDS_VERSION=1.1.6 +RUN wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-$FREETDS_VERSION.tar.gz \ + && tar -xzf freetds-$FREETDS_VERSION.tar.gz \ + && rm freetds-$FREETDS_VERSION.tar.gz \ + && cd freetds-$FREETDS_VERSION \ + && ./configure --prefix=/usr/local --with-tdsver=7.3 \ + && make \ + && make install \ + && cd .. + +# Make temp directory for ruby images +RUN mkdir -p /tmp/bundle +RUN chmod 777 /tmp/bundle + COPY init_container.sh /bin/ COPY startup.sh /opt/ COPY sshd_config /etc/ssh/ @@ -13,7 +86,7 @@ RUN apt-get update -qq \ && echo "cd /home" >> /etc/bash.bashrc RUN eval "$(rbenv init -)" \ - && rbenv global 2.3.8 + && rbenv global $RUBY_VERSION RUN chmod 755 /bin/init_container.sh \ && mkdir -p /home/LogFiles/ \ @@ -28,9 +101,9 @@ ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot # install libssl1.0.2 -RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb \ +RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb \ && apt-get install dialog \ - && dpkg -i libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb + && dpkg -i libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb WORKDIR /home/site/wwwroot diff --git a/2.3.8/README.txt b/2.3.8/README.txt deleted file mode 100644 index 5c6c91f..0000000 --- a/2.3.8/README.txt +++ /dev/null @@ -1 +0,0 @@ -This image is in development, not yet a working state. Use 2.3-1 for personal testing. diff --git a/2.3.8/init_container.sh b/2.3.8/init_container.sh index bd210bb..564c6fb 100644 --- a/2.3.8/init_container.sh +++ b/2.3.8/init_container.sh @@ -10,10 +10,13 @@ A P P S E R V I C E O N L I N U X Documentation: http://aka.ms/webapp-linux Ruby quickstart: https://aka.ms/ruby-qs - +Ruby version $RUBY_VERSION EOL cat /etc/motd +# Get environment variables to show up in SSH session +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start @@ -21,6 +24,6 @@ service ssh start eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) eval "$(rbenv init -)" -rbenv global 2.3.8 +rbenv global $RUBY_VERSION /opt/startup.sh "$@" diff --git a/2.3.8/sshd_config b/2.3.8/sshd_config index 7787ce7..aca8f95 100644 --- a/2.3.8/sshd_config +++ b/2.3.8/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/2.4.5/Dockerfile b/2.4.5/Dockerfile index 9105026..084e0ec 100644 --- a/2.4.5/Dockerfile +++ b/2.4.5/Dockerfile @@ -1,6 +1,79 @@ -FROM appsvc/rubybase:2.4.5 +FROM buildpack-deps:jessie-curl LABEL maintainer="Azure App Services Container Images " +ENV RUBY_VERSION="2.4.5" + +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + +RUN apt-get update -qq + +# Dependencies for various ruby and rubygem installations +RUN apt-get install -y git --no-install-recommends +RUN apt-get install -y libreadline-dev bzip2 build-essential libssl-dev zlib1g-dev libpq-dev libsqlite3-dev \ + curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev libyaml-dev sqlite3 autoconf \ + libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev bison libxslt-dev \ + libxml2-dev libmysqlclient-dev --no-install-recommends wget + +# rbenv +ENV RBENV_ROOT="/usr/local/.rbenv" +RUN git clone https://github.com/rbenv/rbenv.git $RBENV_ROOT +RUN chmod -R 777 $RBENV_ROOT + +ENV PATH="$RBENV_ROOT/bin:/usr/local:$PATH" + +RUN git clone https://github.com/rbenv/ruby-build.git $RBENV_ROOT/plugins/ruby-build +RUN chmod -R 777 $RBENV_ROOT/plugins/ruby-build + +RUN $RBENV_ROOT/plugins/ruby-build/install.sh + +# Install ruby +ENV RUBY_CONFIGURE_OPTS=--disable-install-doc + +ENV RUBY_CFLAGS=-O3 + +RUN cd $RBENV_ROOT \ + && git pull + +RUN eval "$(rbenv init -)" \ + && rbenv install --force $RUBY_VERSION \ + && rbenv rehash \ + && rbenv global $RUBY_VERSION \ + && ls /usr/local -a \ + && gem install bundler --version "=1.13.6" \ + && chmod -R 777 $RBENV_ROOT/versions \ + && chmod -R 777 $RBENV_ROOT/version + +RUN eval "$(rbenv init -)" \ + && rbenv global $RUBY_VERSION \ + && bundle config --global build.nokogiri -- --use-system-libraries + +# Because Nokogiri tries to build libraries on its own otherwise +ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +# SQL Server gem support +RUN apt-get install -y unixodbc-dev + +# find latest version of FreeTDS ftp://ftp.freetds.org/pub/freetds/stable/ +ENV FREETDS_VERSION=1.1.6 +RUN wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-$FREETDS_VERSION.tar.gz \ + && tar -xzf freetds-$FREETDS_VERSION.tar.gz \ + && rm freetds-$FREETDS_VERSION.tar.gz \ + && cd freetds-$FREETDS_VERSION \ + && ./configure --prefix=/usr/local --with-tdsver=7.3 \ + && make \ + && make install \ + && cd .. + +# Make temp directory for ruby images +RUN mkdir -p /tmp/bundle +RUN chmod 777 /tmp/bundle + COPY init_container.sh /bin/ COPY startup.sh /opt/ COPY sshd_config /etc/ssh/ @@ -13,7 +86,7 @@ RUN apt-get update -qq \ && echo "cd /home" >> /etc/bash.bashrc RUN eval "$(rbenv init -)" \ - && rbenv global 2.4.5 + && rbenv global $RUBY_VERSION RUN chmod 755 /bin/init_container.sh \ && mkdir -p /home/LogFiles/ \ @@ -28,9 +101,9 @@ ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot # install libssl1.0.2 -RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb \ +RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb \ && apt-get install dialog \ - && dpkg -i libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb + && dpkg -i libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb WORKDIR /home/site/wwwroot diff --git a/2.4.5/README.txt b/2.4.5/README.txt deleted file mode 100644 index 5c6c91f..0000000 --- a/2.4.5/README.txt +++ /dev/null @@ -1 +0,0 @@ -This image is in development, not yet a working state. Use 2.3-1 for personal testing. diff --git a/2.4.5/init_container.sh b/2.4.5/init_container.sh index 008240f..564c6fb 100644 --- a/2.4.5/init_container.sh +++ b/2.4.5/init_container.sh @@ -10,10 +10,13 @@ A P P S E R V I C E O N L I N U X Documentation: http://aka.ms/webapp-linux Ruby quickstart: https://aka.ms/ruby-qs - +Ruby version $RUBY_VERSION EOL cat /etc/motd +# Get environment variables to show up in SSH session +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start @@ -21,6 +24,6 @@ service ssh start eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) eval "$(rbenv init -)" -rbenv global 2.4.5 +rbenv global $RUBY_VERSION /opt/startup.sh "$@" diff --git a/2.4.5/sshd_config b/2.4.5/sshd_config index 7787ce7..aca8f95 100644 --- a/2.4.5/sshd_config +++ b/2.4.5/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/2.5.5/Dockerfile b/2.5.5/Dockerfile index 8d52ff8..f64ab59 100644 --- a/2.5.5/Dockerfile +++ b/2.5.5/Dockerfile @@ -1,6 +1,79 @@ -FROM appsvc/rubybase:2.5.5 +FROM buildpack-deps:jessie-curl LABEL maintainer="Azure App Services Container Images " +ENV RUBY_VERSION="2.5.5" + +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + +RUN apt-get update -qq + +# Dependencies for various ruby and rubygem installations +RUN apt-get install -y git --no-install-recommends +RUN apt-get install -y libreadline-dev bzip2 build-essential libssl-dev zlib1g-dev libpq-dev libsqlite3-dev \ + curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev libyaml-dev sqlite3 autoconf \ + libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev bison libxslt-dev \ + libxml2-dev libmysqlclient-dev --no-install-recommends wget + +# rbenv +ENV RBENV_ROOT="/usr/local/.rbenv" +RUN git clone https://github.com/rbenv/rbenv.git $RBENV_ROOT +RUN chmod -R 777 $RBENV_ROOT + +ENV PATH="$RBENV_ROOT/bin:/usr/local:$PATH" + +RUN git clone https://github.com/rbenv/ruby-build.git $RBENV_ROOT/plugins/ruby-build +RUN chmod -R 777 $RBENV_ROOT/plugins/ruby-build + +RUN $RBENV_ROOT/plugins/ruby-build/install.sh + +# Install ruby +ENV RUBY_CONFIGURE_OPTS=--disable-install-doc + +ENV RUBY_CFLAGS=-O3 + +RUN cd $RBENV_ROOT \ + && git pull + +RUN eval "$(rbenv init -)" \ + && rbenv install --force $RUBY_VERSION \ + && rbenv rehash \ + && rbenv global $RUBY_VERSION \ + && ls /usr/local -a \ + && gem install bundler --version "=1.13.6" \ + && chmod -R 777 $RBENV_ROOT/versions \ + && chmod -R 777 $RBENV_ROOT/version + +RUN eval "$(rbenv init -)" \ + && rbenv global $RUBY_VERSION \ + && bundle config --global build.nokogiri -- --use-system-libraries + +# Because Nokogiri tries to build libraries on its own otherwise +ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +# SQL Server gem support +RUN apt-get install -y unixodbc-dev + +# find latest version of FreeTDS ftp://ftp.freetds.org/pub/freetds/stable/ +ENV FREETDS_VERSION=1.1.6 +RUN wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-$FREETDS_VERSION.tar.gz \ + && tar -xzf freetds-$FREETDS_VERSION.tar.gz \ + && rm freetds-$FREETDS_VERSION.tar.gz \ + && cd freetds-$FREETDS_VERSION \ + && ./configure --prefix=/usr/local --with-tdsver=7.3 \ + && make \ + && make install \ + && cd .. + +# Make temp directory for ruby images +RUN mkdir -p /tmp/bundle +RUN chmod 777 /tmp/bundle + COPY init_container.sh /bin/ COPY startup.sh /opt/ COPY sshd_config /etc/ssh/ @@ -13,7 +86,7 @@ RUN apt-get update -qq \ && echo "cd /home" >> /etc/bash.bashrc RUN eval "$(rbenv init -)" \ - && rbenv global 2.5.5 + && rbenv global $RUBY_VERSION RUN chmod 755 /bin/init_container.sh \ && mkdir -p /home/LogFiles/ \ @@ -28,9 +101,9 @@ ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot # install libssl1.0.2 -RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb \ +RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb \ && apt-get install dialog \ - && dpkg -i libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb + && dpkg -i libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb WORKDIR /home/site/wwwroot diff --git a/2.5.5/README.txt b/2.5.5/README.txt deleted file mode 100644 index 5c6c91f..0000000 --- a/2.5.5/README.txt +++ /dev/null @@ -1 +0,0 @@ -This image is in development, not yet a working state. Use 2.3-1 for personal testing. diff --git a/2.5.5/init_container.sh b/2.5.5/init_container.sh index 3ef0a93..564c6fb 100644 --- a/2.5.5/init_container.sh +++ b/2.5.5/init_container.sh @@ -10,10 +10,13 @@ A P P S E R V I C E O N L I N U X Documentation: http://aka.ms/webapp-linux Ruby quickstart: https://aka.ms/ruby-qs - +Ruby version $RUBY_VERSION EOL cat /etc/motd +# Get environment variables to show up in SSH session +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start @@ -21,6 +24,6 @@ service ssh start eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) eval "$(rbenv init -)" -rbenv global 2.5.5 +rbenv global $RUBY_VERSION /opt/startup.sh "$@" diff --git a/2.5.5/sshd_config b/2.5.5/sshd_config index 7787ce7..aca8f95 100644 --- a/2.5.5/sshd_config +++ b/2.5.5/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/2.6.2/Dockerfile b/2.6.2/Dockerfile index 04e9c92..2399b5e 100644 --- a/2.6.2/Dockerfile +++ b/2.6.2/Dockerfile @@ -1,6 +1,79 @@ -FROM appsvc/rubybase:2.6.2 +FROM buildpack-deps:jessie-curl LABEL maintainer="Azure App Services Container Images " +ENV RUBY_VERSION="2.6.2" + +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + +RUN apt-get update -qq + +# Dependencies for various ruby and rubygem installations +RUN apt-get install -y git --no-install-recommends +RUN apt-get install -y libreadline-dev bzip2 build-essential libssl-dev zlib1g-dev libpq-dev libsqlite3-dev \ + curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev libyaml-dev sqlite3 autoconf \ + libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev bison libxslt-dev \ + libxml2-dev libmysqlclient-dev --no-install-recommends wget + +# rbenv +ENV RBENV_ROOT="/usr/local/.rbenv" +RUN git clone https://github.com/rbenv/rbenv.git $RBENV_ROOT +RUN chmod -R 777 $RBENV_ROOT + +ENV PATH="$RBENV_ROOT/bin:/usr/local:$PATH" + +RUN git clone https://github.com/rbenv/ruby-build.git $RBENV_ROOT/plugins/ruby-build +RUN chmod -R 777 $RBENV_ROOT/plugins/ruby-build + +RUN $RBENV_ROOT/plugins/ruby-build/install.sh + +# Install ruby +ENV RUBY_CONFIGURE_OPTS=--disable-install-doc + +ENV RUBY_CFLAGS=-O3 + +RUN cd $RBENV_ROOT \ + && git pull + +RUN eval "$(rbenv init -)" \ + && rbenv install --force $RUBY_VERSION \ + && rbenv rehash \ + && rbenv global $RUBY_VERSION \ + && ls /usr/local -a \ + && gem install bundler --version "=1.13.6" \ + && chmod -R 777 $RBENV_ROOT/versions \ + && chmod -R 777 $RBENV_ROOT/version + +RUN eval "$(rbenv init -)" \ + && rbenv global $RUBY_VERSION \ + && bundle config --global build.nokogiri -- --use-system-libraries + +# Because Nokogiri tries to build libraries on its own otherwise +ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +# SQL Server gem support +RUN apt-get install -y unixodbc-dev + +# find latest version of FreeTDS ftp://ftp.freetds.org/pub/freetds/stable/ +ENV FREETDS_VERSION=1.1.6 +RUN wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-$FREETDS_VERSION.tar.gz \ + && tar -xzf freetds-$FREETDS_VERSION.tar.gz \ + && rm freetds-$FREETDS_VERSION.tar.gz \ + && cd freetds-$FREETDS_VERSION \ + && ./configure --prefix=/usr/local --with-tdsver=7.3 \ + && make \ + && make install \ + && cd .. + +# Make temp directory for ruby images +RUN mkdir -p /tmp/bundle +RUN chmod 777 /tmp/bundle + COPY init_container.sh /bin/ COPY startup.sh /opt/ COPY sshd_config /etc/ssh/ @@ -13,7 +86,7 @@ RUN apt-get update -qq \ && echo "cd /home" >> /etc/bash.bashrc RUN eval "$(rbenv init -)" \ - && rbenv global 2.6.2 + && rbenv global $RUBY_VERSION RUN chmod 755 /bin/init_container.sh \ && mkdir -p /home/LogFiles/ \ @@ -28,9 +101,9 @@ ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot # install libssl1.0.2 -RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb \ +RUN wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb \ && apt-get install dialog \ - && dpkg -i libssl1.0.2_1.0.2q-1~deb9u1_amd64.deb + && dpkg -i libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb WORKDIR /home/site/wwwroot diff --git a/2.6.2/README.txt b/2.6.2/README.txt deleted file mode 100644 index 5c6c91f..0000000 --- a/2.6.2/README.txt +++ /dev/null @@ -1 +0,0 @@ -This image is in development, not yet a working state. Use 2.3-1 for personal testing. diff --git a/2.6.2/init_container.sh b/2.6.2/init_container.sh index cb6f798..564c6fb 100644 --- a/2.6.2/init_container.sh +++ b/2.6.2/init_container.sh @@ -10,10 +10,13 @@ A P P S E R V I C E O N L I N U X Documentation: http://aka.ms/webapp-linux Ruby quickstart: https://aka.ms/ruby-qs - +Ruby version $RUBY_VERSION EOL cat /etc/motd +# Get environment variables to show up in SSH session +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start @@ -21,6 +24,6 @@ service ssh start eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) eval "$(rbenv init -)" -rbenv global 2.6.2 +rbenv global $RUBY_VERSION /opt/startup.sh "$@" diff --git a/2.6.2/sshd_config b/2.6.2/sshd_config index 7787ce7..aca8f95 100644 --- a/2.6.2/sshd_config +++ b/2.6.2/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp