NetCAT – NetBeans 10 and testing FTP connections
– Docker based

That’s yet another post about making live easier through Docker. This time, I am focusing on FTP.

Testing FTP features in PHP based project requires running FTP server. And, let’s be honest, this is a place where you can face some issues. First of all, you have to have FTP server running, you have to convince your FTP server admin to give you some space there, and you have to convince him to allow you to play with WWW storage :) I guess, you can call it a challange.

Another approach is to set up your own machine – doable.

And yet another approach is to use specially crafted Docker image. Brought to you as a dedicated solution for all your NetCAT testing related troubles ;)

> git clone

That’s almost everything you need to do. There are just few more steps to go. Simply build it, run it and let it go.

You can run container with one of three, available, flavors: implicit_ssl, explicit_ssl, or no_ssl.

> docker build -t ftptest .

> docker run -i -t \
  -p 80:80 \
  -p 2020:20 \
  -p 2021:21 \
  -p 990:990 \
  -p 21100-21110:21100-21110 \
  ftptest /bin/ no_ssl

After it is successfully started you will be able to read




        NetCAT FTP testing server
        - FTP User: html
        - FTP Password: html

That’s it. We have server running. And, it’s not just a FTP server. We have apache2 on board as well.

To get it running inside NetBeans, we simply have to configure PHP Application from Remote Server. Once you are there, make sure to use proper settings for the project

and location of the server (make sure to clear Upload Directory) field.

While setting up FTP connection, you can choose Pure FTP when you have started container with nossl option, or you can use Explicit FTP using TLS when you have started container with ssl option.

That’s it. You have your own, remote, PHP project ready for development