I have a GPLv3 code inside the container which I am planning to distribute. I also have a proprietary code in the same hardware where the GPLv3 code inside the container runs.
Does this mean I have to publish my proprietary code?
In all cases you need to comply with all the licenses of the third-party code included in the Docker images. And you need to comply with the L/GPL for the L/GPL-licensed code in particular, and this for all the layers of the Docker image you redistribute (which will typically include the base image and layers and all the base OS packages) and anything using a third-party license.
If your proprietary code has some intimate relationship with GPL-licensed code you may also need to make your code available under a GPL-compatible license.
The details and specifics matter a lot here: it really boils down to how you interact with the GPL-licensed code and if you have modified it or not.