I agree with the advice of ALL the previous posters as well.
I would also suggest a VERY small container, such as plastic shoe box with TINY holes melted in the lid and/or sides(soldering gun) for air circulation. Also, a little "hide box" is EXTREMELY important to make a hatchling feel secure!!
Just cut a small notch in the upper lip portion of a small yogurt container, or something similar.
Whatever you do,.......make ASOLUTELY CERTAIN that the lid will stay nice and SECURE!!!!!!!....if not, the little dude will most likely be gone forever, never to be seen again!, I cannot stress this point enough!........just ask some other long time snake keepers!......in forty years of owning/breeding countless hundreds of snakes, I know this all too well. Fortunately, I learned from my own mistakes many years ago.
I also forgot to mention, that if a small snake is put into an aquarium, no matter how tall,....thinking the cute little snake is way too small to get up there,......surprise!!, they will, they will crawl up the silicone in the corners!!! it grips their ventral scales like glue!!! and if the lid is not tight, and with no gaps at all,.....again, it will escape!....most lids for aquariums don't fit tight at all!, and definitely are NOT meant to contain a very small snake. Larger snakes will do fine in them, as long as they don't rub their noses raw on the screen,.......but that usually means something isn't right with it's environment.
best regards, ~Doug

-----
"Better to be silent and thought a fool, than to open mouth and remove any doubt!"