hi @danielsenorjan ,
I am pretty sure it is possible to do this but you will end up with a fairly complex network setup with a lot of possible points of failure so I would only suggest trying if you have a fairly solid understanding of networking.
For starters you would have to make up your mind how to connect your computer. You could use static ip addresses or if you want to use dhcp either the computer or the RPi would have to provide a dnsmasq server. Typically this would be the RPi as it also knows the network configuration (default router, name server…)
In this case you would have to provide a NetworkManager configuration for the eth0 interface providing a static IP address for the RPI. You would then have to create an container with Host Networking enabled that runs the dnsmasq DNS & DHCP server. The Server would need to be set up to forward DNS queries and DHCP would hand out a compatible address range.
Next thing you would have to configure the IP-tables firewall to provide masquerading of the packets coming from the subnet that you have created.
Otherwise the packets you forward are never going to be routed back to you. Messing with the ip_tables firewall has to be done with special care as there are a set of rules governing the docker network interfaces and you do not want to destroy those. I found some recipes on how to do this in ubuntu but most start by deleting all sorts of firewall rules which would not do you any good.
Last thing is the routing. You would have to make sure that the packets from and to your subnet are being routed to the internet and back to your subnet.
If you are not familiar with the above tasks you are likely to render your rpi offline at some point so you better have a monitor & keyboard ready for that case.
You best bet would probably be to look for a project which delivers this service and allows you to configure it with a GUI or web interface or to hook your computer in to a free port on the Wifi router…