aws / amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
https://sagemaker-examples.readthedocs.io
Apache License 2.0
9.79k stars 6.66k forks source link

Alter JupyterLab dockerfile to block target domain / IP from running contiainer #4648

Open colelloa opened 2 months ago

colelloa commented 2 months ago

Hi,

I'd like to be able to alter the sagemaker jupyterlab container to block a certain domain and IP address from being accessed by the jupyterlab user.

I see that https://github.com/aws/studio-lab-examples/issues/118 is not possible, so I cannot use firewalld or iptables, and I cannot seem to get --add-host to work when building the container either. Of course, cannot alter /etc/hosts due to inherent docker functionality there.

Due to our cloud topology, it's unfortunately not possible to do this at the security groups level.