OpenGL itself (the specification) does not impose any requirements on window system integration and where and how a render context can be obtained. It is perfectly legal for a OpenGL implementation to offer off-screen context creation. The practical question is: Which OpenGL implementations do this and what's the API for that.
On Linux with DRI/DRM/Mesa a window and screenless OpenGL context can be created with the GBM API/library on KMS supported GPUs.
Also Mesa has an Off-Screen-Mesa variant (OSMesa), which however at the moment only does software based rendering (llvmpipe or softpipe), but it might add GPU support later.
EGL (the Khronos cross platform API for context management) also offers windowless/screenless context creation options, that are optional to be supported by drivers. At least the NVidia proprietary drivers do support it: https://devblogs.nvidia.com/parallelforall/egl-eye-opengl-visualization-without-x-server/