I was generating a Dockerfile with the > Dockerfile
command, and decided to leave the PORT
section as an empty string, as I'm generating a base image that doesn't require exposing. This is what is generated
I know it's as easy as just deleting the last line, but I'm wondering if this is by design, or if someone doesn't specify a port, EXPOSE should not be generated.
Ideally we will not add the EXPOSE if port is empty.
Need to deal with compose files, too.
Moving forward we won't be generating dockerfiles with empty expose statements. It's easy to delete them manually.