On Wednesday the court heard how the site in Folkestone was "unsafe and entirely unsuitable" to house asylum seekers.
Almost 200 people tested positive for Coronavirus during an outbreak earlier this year.
The Home Office says improvements have been made, but six asylum seekers formally housed in the barracks say the accommodation breached their human rights.
At the start of a two-day hearing on Wednesday, lawyers representing the six men said accommodating asylum seekers at the barracks could amount to false imprisonment.
They also argue that the Home Office failed to put in place a process to prevent "particularly vulnerable asylum seekers" being accommodated at the barracks.
Tom Hickman QC, representing four of the six men, said: "The camp was squalid, ill-equipped, lacking in personal privacy and, most fundamentally of all, unsafe."
Lisa Giovannetti QC, representing the Home Office, said in written submissions that the department accepted there is "a particular risk of Covid-19 transmission in congregate residential settings".
However, she added that "it does not follow from the fact that there is a heightened risk of transmission in congregate settings that an individual residing in such a setting faces a substantial risk of serious illness".
Ms Giovannetti said the Home Office "has taken reasonable steps to ensure that persons who are specifically vulnerable to severe illness or death from Covid-19 are not placed in a congregate setting".
She also pointed out that "none of the claimants has become seriously ill with Covid-19".
The hearing before Mr Justice Linden is due to conclude on Thursday afternoon, and it is expected the judge's ruling will be reserved to a later date.