testenv
testenv copied to clipboard
deployment.sh and Dockerfile not working.
deployment.sh
run at Ubuntu 16.04.3 LTS
root:~/testenv# ./deployment.sh
### Updating base system
./deployment.sh: line 3: aptitude: command not found
./deployment.sh: line 4: aptitude: command not found
### Installing Apache, PHP, git and generic PHP modules
./deployment.sh: line 7: aptitude: command not found
### Configuring Apache and PHP
rm: cannot remove '/var/www/index.html': No such file or directory
mkdir: cannot create directory ‘/var/www/test’: No such file or directory
chmod: cannot access '/var/www/test': No such file or directory
./deployment.sh: line 13: a2enmod: command not found
sed: can't read /etc/apache2/sites-enabled/*: No such file or directory
sed: can't read /etc/php5/*/php.ini: No such file or directory
sed: can't read /etc/php5/conf.d/suhosin.ini: No such file or directory
update-rc.d: error: initscript does not exist: /etc/init.d/apache2
### Restarting Apache web server
Failed to restart apache2.service: Unit apache2.service not found.
### Downloading sqlmap test environment to /var/www
./deployment.sh: line 23: cd: /var/www: No such file or directory
fatal: destination path 'sqlmap' already exists and is not an empty directory.
### Installing MySQL database management system (clients, server, libraries)
### NOTE: when asked for a password, type 'testpass'
./deployment.sh: line 28: aptitude: command not found
update-rc.d: error: initscript does not exist: /etc/init.d/mysql
### Initializing MySQL test database and table
### NOTE: when asked for a password, type 'testpass'
./deployment.sh: line 33: /var/www/sqlmap/schema/mysql.sql: No such file or directory
sed: can't read /etc/mysql/my.cnf: No such file or directory
Failed to restart mysql.service: Unit mysql.service not found.
### Installing PostgreSQL database management system (clients, server, libraries)
./deployment.sh: line 38: aptitude: command not found
update-rc.d: error: initscript does not exist: /etc/init.d/postgresql
### Initializing PostgreSQL test database and table
### NOTE: when asked for a password, type 'testpass'
Now type: ALTER USER postgres WITH PASSWORD 'testpass'; - hit RETURN, type \q - hit RETURN
No passwd entry for user 'postgres'
passwd: user 'postgres' does not exist
No passwd entry for user 'postgres'
./deployment.sh: line 47: psql: command not found
./deployment.sh: line 48: psql: command not found
./deployment.sh: line 49: /etc/postgresql/9.1/main/pg_hba.conf: No such file or directory
sed: can't read /etc/postgresql/9.1/main/postgresql.conf: No such file or directory
sed: can't read /etc/postgresql/9.1/main/postgresql.conf: No such file or directory
Failed to restart postgresql.service: Unit postgresql.service not found.
### Configuring PHP for SQLite 2
--2018-06-01 13:33:47-- http://www.spadim.com.br/SQLite-1.0.4.tgz
Resolving www.spadim.com.br (www.spadim.com.br)... 177.73.233.211
Connecting to www.spadim.com.br (www.spadim.com.br)|177.73.233.211|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 395454 (386K) [application/x-gzip]
Saving to: ‘SQLite-1.0.4.tgz.1’
Dockerfile
docker version: Docker version 1.13.1, build 092cba3
logs below
root@vultr:~/testenv# docker build .
Sending build context to Docker daemon 12.46 MB
Step 1/17 : FROM debian:6.0.10
6.0.10: Pulling from library/debian
069873d23334: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:f5836a4b20089fa5808c34ac452be28667ce78106f2f1526d0ba7f5a9ea28e1e
Status: Downloaded newer image for debian:6.0.10
---> a873733ef581
Step 2/17 : RUN apt-get update
---> Running in 5774a941dd9b
Ign http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org squeeze/updates Release
Ign http://httpredir.debian.org squeeze Release.gpg
Err http://security.debian.org squeeze/updates/main amd64 Packages
404 Not Found [IP: 149.20.4.14 80]
Ign http://httpredir.debian.org squeeze-updates Release.gpg
Ign http://httpredir.debian.org squeeze-lts Release.gpg
Ign http://httpredir.debian.org squeeze Release
Ign http://httpredir.debian.org squeeze-updates Release
Ign http://httpredir.debian.org squeeze-lts Release
Err http://httpredir.debian.org squeeze/main amd64 Packages
404 Not Found [IP: 151.101.20.204 80]
Err http://httpredir.debian.org squeeze-updates/main amd64 Packages
404 Not Found [IP: 151.101.20.204 80]
Err http://httpredir.debian.org squeeze-lts/main amd64 Packages
404 Not Found [IP: 151.101.20.204 80]
W: Failed to fetch http://security.debian.org/dists/squeeze/updates/main/binary-amd64/Packages.gz 404 Not Found [IP: 149.20.4.14 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/squeeze/main/binary-amd64/Packages.gz 404 Not Found [IP: 151.101.20.204 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/squeeze-updates/main/binary-amd64/Packages.gz 404 Not Found [IP: 151.101.20.204 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/squeeze-lts/main/binary-amd64/Packages.gz 404 Not Found [IP: 151.101.20.204 80]
E: Some index files failed to download, they have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100