The ornamental design for a portcap for a container, as shown and described.
FIG. 1 is a right-side perspective view of a port cap for a container showing our new design;
FIG. 2 is a front elevational view thereof, the rear elevational view being a mirror image;
FIG. 3 is a right-side elevational view thereof, the left-side elevational view being a mirror image;
FIG. 4 is a top plan view thereof; and,
FIG. 5 is a bottom plan view thereof.
The broken lines representing portions of the port cap for a container are included for environmental purposes only and form no part of the claimed design.