You can use stereotypes and skinparam to do it:
@startuml
hide stereotype
show <<Inner>> stereotype
skinparam componentBorderColor<<Outer>> Yellow
skinparam componentBorderColor<<Inner>> Blue
component OuterContainer <<Outer>> {
component InnerContainer <<Outer>> {
component A <<Inner>>
component B <<Inner>>
}
}
@enduml
Generates: http://www.plantuml.com/plantuml/uml/XP0n2iCm34Ltdq87CI5DfawTEvfQa517Ch9CA2LtZp6qRWgbyt__VQG-gHFDIp3Jx16IeY3h8w8nQU8Lh3qJeNJTCRhF59su1MwyH2Oa7LWyoiY1nTfBrjgvOWYy_iLV4qF8HVvce6f69dLp0Q1vdmQQ2chz5_O9djevNybmI3QpcHx9bxVi