You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.3 KiB

FROM ubuntu:bionic
# bionic = 18 LTS (long term support)
# Note this image uses gawk
# Update and install required software
RUN apt-get update --fix-missing
RUN apt-get install -y git curl dnsutils ldnsutils wget gawk nginx-light
RUN apt-get install -y ftp vsftpd
RUN apt-get install -y openssh-server
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private
COPY ./test/test-config/nginx-ubuntu-no-ssl /etc/nginx/sites-enabled/default
# Setup ftp
ENV VSFTPD_CONF=/etc/vsftpd.conf
ENV FTP_PASSIVE_DEFAULT=false
COPY test/test-config/vsftpd.conf /etc/vsftpd.conf
# The default init.d script seems to have an incorrect check that vsftpd has started
COPY test/test-config/vsftpd.initd /etc/init.d/vsftpd
RUN adduser ftpuser
RUN echo 'ftpuser:ftpuser' | chpasswd
RUN adduser ftpuser www-data
RUN adduser root www-data
RUN chown -R www-data.www-data /var/www
RUN chmod g+w -R /var/www
# Prevent "Can't load /root/.rnd into RNG" error from openssl
RUN touch /root/.rnd
# BATS (Bash Automated Testings)
RUN git clone --depth 1 https://github.com/bats-core/bats-core.git /bats-core --branch v1.2.1
RUN git clone --depth 1 https://github.com/bats-core/bats-support /bats-support
RUN git clone --depth 1 https://github.com/bats-core/bats-assert /bats-assert
RUN /bats-core/install.sh /usr/local
EXPOSE 80 443
# Run eternal loop - for testing
CMD [ "tail", "-f", "/dev/null" ]