
I've anonymized and broke the commands up to add comments and explanation. RUN ln -s /etc/nginx/sites-available/reverse \ RUN unlink /etc/nginx/sites-enabled/default RUN sed -i 's#Listen 80#Listen 84#g' /etc/apache2/nf RUN unlink /etc/apache2/sites-enabled/nf & \ RUN printf "$\n" | smbpasswd -a -s $USERNAME RUN useradd -m -N -p $PASSWORD -s /bin/bash -g root -G \ Php7.2-common php7.2-sqlite3 rsync git php-zip unzip Libapache2-mod-php7.2 sqlite php7.2-mbstring php7.2-xml \

Nginx openssh-server apache2 htop curl php7.2 \ Samba dos2unix dnsutils ifupdown iputils-ping nano net-tools \
QNAP MAC ADDRESS INSTALL
& apt-get install -y apt-utils cifs-utils openssh-sftp-server \
QNAP MAC ADDRESS UPDATE
RUN apt-get update & apt-get upgrade -y & apt-get -y autoremove \ # install nginx, apache and other basic apps The dockerfile could look like this: FROM ubuntu From the container's perspective, its operating system agnostic. Well that's the appealing thing about Docker, isn't it? You can build a docker container on any platform and it will run on any other platform that supports Docker. Then each time the container starts it will be fixed at this mac address. If you don't know how json is formatted, you need to add a comma for each key/value pair. In there you need a new KEY:VALUE (string+string) like this: "mac_addr" : "xx:xx:xx:xx:xx:xx". In this file locate the Network section (It might be easier to copy/paste into a JSON parser site).

If you go to your container storage area in your qnap volume, and go to Container-Station-Data/lib/docker/containers - find your container folder (a very long hashed folder name for each container) - inside you'll find a qnap.json file. Anyway, I found a way to fix this without having to attempt dockering with SSH or whatnot. So if my lad's friends want to connect but i've restarted my NAS or the container, I had to laboriously re-forward the port in my router's setup. As you may or not know, each time you spin up a docker container - in my case a Minecraft server for my kid - it gives it a new mac address. My router's port forwarding is based on the MAC address rather than the IP.
