A "moron" fired up to eight bullets into the CFMEU's Melbourne headquarters, shattering the glass front door and piercing upper level windows.

A car pulled up outside the Swanston Street offices in Carlton just after 3am on Wednesday and witnesses saw a man get out, fire a gun and drive away.

Police marked shell casings on the tram tracks outside the office and bullet holes were visible in the ground floor walls and upper level windows.

CFMEU state secretary John Setka admitted the list of people who had a beef with the union was "long and distinguished".

"We all have our disputes, we all have our squabbles here and there, but you don't resolve it using guns, I mean, we never have," he said.

Staff preparing for their annual Christmas party on Wednesday afternoon were in shock after arriving at work to be told the office had been attacked.

"We told them some moron's fired shots at the building and endangered all of Melbourne. I mean, what else can you tell them?" Mr Setka said.

"You got that idiot out there that you can never stop."

Detective Sergeant Haydn Beale said police were speaking to witnesses and looking for CCTV footage of the "concerning and dangerous" attack.

"This end of town is a little difficult I suppose, it's sort of the bottom end of town, there's probably not as much CCTV as there is in the heart of the city," he told reporters.

Det Sgt Beale said the community was not at risk from the gunman.

"This is obviously a fairly specifically targeted type situation," he said.

"A person has come here with a specific reason and specific intent."

Police are yet to determine what type of car and gun was used in the shooting.