Mildly relativistic collisionless shock formed by magnetic piston