Can you mount a compressor on its side?

Like this? If I put the hoses on the top I can't close the hood. TIA