West Coast ports recorded solid gains in container traffic in June, with imports up 4 percent over the same month last year, and total volume increasing 3 percent.