In general, what you would do is split the work into independent tasks
-
The first task would use a docker container and allow you to build your docker images as you are currently doing, but you would then push them to a repo such as docker hub.
-
Run the second task as a normal machine environment, which will then allow a docker environment to be created without any limitations as you are no longer running docker within docker.
Doing this will provide a ‘stable’ environment in which you can run docker very much the same way as you would within your own environment or on most third-party environments you may deploy to.