Let Docker access the internet by passing through the VPN connection My host machine, a laptop running Manjaro Linux, is connected via VPN to the internet. I use strongSwan, the open-source IPsec-based VPN solution. IPsec with the IKEv2 protocol is fast and secure. Now, Docker doesn't work. Networking issues are a common problem with VPN and Docker. You can piggyback your Docker container on the host network. That technique only works on Linux machines.
Docker builds containers via layers. All commands add another layer to the already existing image. What does that mean for changing file permissions via chown or chmod? Let's say we build this image: FROMfrolvlad/alpine-miniconda3:python3.7 AS build# set working directoryWORKDIR/usr/src/app# copy codeCOPY ./code /codeCOPY ./notebooks /notebooks# add non-root userRUN addgroup –system user && \ adduser –system -G user user && \ chown -R user:user /usr/src/appAfter copying the code from the host machine to the container, we switch permissions for the working directory from root to user.
The last fews day's I've been learning how to deploy a Flask and React application to AWS. I've decided to shelf that project for now. As a hobby developer and learner I don't need all the features that AWS offers. A setup with Load Balancer, RDS instances, etc. adds a lot of complexity which I have no use for. The plan for this month was to create a test-driven Python and React application.
How to run nginx as non-privileged user with Docker nginx is an open-source solution for web serving and reverse proxying your web application. You put it “in front” of your different services, and nginx can route the traffic to the correct url. That's useful for micro-services, for example. Per default, nginx runs as root user. Why? Only root processes can listen to ports below 1024. The default port for web applications is usually 80 or 443.