Public Repository

Last pushed: 7 months ago
Short Description
Magento 1 with Node.js
Full Description

Dockerfile

FROM webgriffe/magento1-dev

ENV GIT_USER_NAME "Igor Agapie"
ENV GIT_USER_EMAIL "igoragapie@gmail.com"
ENV FTP_USER admin
ENV FTP_PASS admin

RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -

RUN apt-get update \
    && apt-get -y upgrade \
    && apt-get -y autoremove \
    && apt-get -y --force-yes --fix-missing install \
    dpkg-dev debhelper g++ build-essential nano python-software-properties software-properties-common nodejs vsftpd libpam-pwdfile

RUN apt-get clean

RUN npm install -g bower grunt

RUN mkdir -p /var/run/vsftpd/empty

RUN sed -i "s/listen_ipv6=NO/listen_ipv6=YES/" /etc/vsftpd.conf
RUN sed -i "s/anonymous_enable=YES/anonymous_enable=NO/" /etc/vsftpd.conf
RUN echo "write_enable=YES" >> /etc/vsftpd.conf
RUN echo "local_umask=022" >> /etc/vsftpd.conf
RUN echo "local_root=/var/www" >> /etc/vsftpd.conf
RUN echo "chroot_local_user=YES" >> /etc/vsftpd.conf
RUN echo "allow_writeable_chroot=YES" >> /etc/vsftpd.conf
RUN echo "hide_ids=YES" >> /etc/vsftpd.conf

#virutal user settings
RUN echo "user_config_dir=/etc/vsftpd_user_conf" >> /etc/vsftpd.conf
RUN echo "guest_enable=YES" >> /etc/vsftpd.conf
RUN echo "virtual_use_local_privs=YES" >> /etc/vsftpd.conf
RUN echo "nopriv_user=vsftpd" >> /etc/vsftpd.conf
RUN echo "guest_username=vsftpd" >> /etc/vsftpd.conf

RUN mkdir /etc/vsftpd

RUN mv /etc/pam.d/vsftpd /etc/pam.d/vsftpd.bak 

RUN echo "auth required pam_pwdfile.so pwdfile /etc/vsftpd/ftpd.passwd" >> /etc/pam.d/vsftpd
RUN echo "account required pam_permit.so" >> /etc/pam.d/vsftpd

RUN useradd --home /home/vsftpd --gid nogroup -m --shell /bin/false vsftpd

RUN mkdir /etc/vsftpd_user_conf

COPY run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/run.sh

EXPOSE 21

run.sh

#!/bin/bash

git config --global user.name "$GIT_USER_NAME"
git config --global user.email $GIT_USER_EMAIL

htpasswd -c -p -b /etc/vsftpd/ftpd.passwd $FTP_USER $(openssl passwd -1 -noverify $FTP_PASS)

echo "local_root=$APACHE_DOC_ROOT" >> /etc/vsftpd_user_conf/$FTP_USER

#/etc/init.d/vsftpd restart
service vsftpd restart
Docker Pull Command
Owner
iagapie

Comments (0)