diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
index 53f6e974cf4ba050befb2c412da59654399759b9..ade06ff53c465f32bdff7d4a56da464f30f1fede 100644
--- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
+++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c
@@ -1262,6 +1262,7 @@ extern int create_cluster_tables(mysql_conn_t *mysql_conn, char *cluster_name)
 		{ "array_task_pending", "int unsigned default 0 not null" },
 		{ "batch_script", "longtext" },
 		{ "constraints", "text default ''" },
+		{ "container", "text" },
 		{ "cpus_req", "int unsigned not null" },
 		{ "derived_ec", "int unsigned default 0 not null" },
 		{ "derived_es", "text" },
diff --git a/src/plugins/accounting_storage/mysql/as_mysql_job.c b/src/plugins/accounting_storage/mysql/as_mysql_job.c
index 434925fb7b3ab41de855134cb8920f6f4cefc453..b536115e13dfb950da48102bbd409bac926cc1c2 100644
--- a/src/plugins/accounting_storage/mysql/as_mysql_job.c
+++ b/src/plugins/accounting_storage/mysql/as_mysql_job.c
@@ -510,6 +510,8 @@ no_rollup_change:
 			xstrcat(query, ", env_vars");
 		if (job_ptr->details->submit_line)
 			xstrcat(query, ", submit_line");
+		if (job_ptr->container)
+			xstrcat(query, ", container");
 
 		xstrfmtcat(query,
 			   ") values (%u, UNIX_TIMESTAMP(), "
@@ -571,6 +573,9 @@ no_rollup_change:
 		if (job_ptr->details->submit_line)
 			xstrfmtcat(query, ", '%s'",
 				   job_ptr->details->submit_line);
+		if (job_ptr->container)
+			xstrfmtcat(query, ", '%s'",
+				   job_ptr->container);
 
 		xstrfmtcat(query,
 			   ") on duplicate key update "
@@ -647,6 +652,9 @@ no_rollup_change:
 		if (job_ptr->details->submit_line)
 			xstrfmtcat(query, ", submit_line='%s'",
 				   job_ptr->details->submit_line);
+		if (job_ptr->container)
+			xstrfmtcat(query, ", container='%s'",
+				   job_ptr->container);
 
 		DB_DEBUG(DB_JOB, mysql_conn->conn, "query\n%s", query);
 	try_again:
@@ -717,6 +725,9 @@ no_rollup_change:
 		if (job_ptr->details->submit_line)
 			xstrfmtcat(query, "submit_line='%s', ",
 				   job_ptr->details->submit_line);
+		if (job_ptr->container)
+			xstrfmtcat(query, "container='%s', ",
+				   job_ptr->container);
 
 		xstrfmtcat(query, "time_start=%ld, job_name='%s', "
 			   "state=greatest(state, %u), "
diff --git a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c
index a00ab0da39619888950f12d860b68dbd2b95c5f5..86c6fda3e8c24e5b350307a9e446dfcddf02cd3e 100644
--- a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c
+++ b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c
@@ -58,6 +58,7 @@ char *job_req_inx[] = {
 	"t1.array_max_tasks",
 	"t1.array_task_str",
 	"t1.constraints",
+	"t1.container",
 	"t1.cpus_req",
 	"t1.derived_ec",
 	"t1.derived_es",
@@ -115,6 +116,7 @@ enum {
 	JOB_REQ_ARRAY_MAX,
 	JOB_REQ_ARRAY_STR,
 	JOB_REQ_CONSTRAINTS,
+	JOB_REQ_CONTAINER,
 	JOB_REQ_REQ_CPUS,
 	JOB_REQ_DERIVED_EC,
 	JOB_REQ_DERIVED_ES,
@@ -823,6 +825,7 @@ static int _cluster_get_jobs(mysql_conn_t *mysql_conn,
 		job->admin_comment = xstrdup(row[JOB_REQ_ADMIN_COMMENT]);
 		job->system_comment = xstrdup(row[JOB_REQ_SYSTEM_COMMENT]);
 		job->constraints = xstrdup(row[JOB_REQ_CONSTRAINTS]);
+		job->container = xstrdup(row[JOB_REQ_CONTAINER]);
 		job->flags = slurm_atoul(row[JOB_REQ_FLAGS]);
 		job->state_reason_prev = slurm_atoul(row[JOB_REQ_STATE_REASON]);
 
@@ -1089,6 +1092,7 @@ static int _cluster_get_jobs(mysql_conn_t *mysql_conn,
 				atof(step_row[STEP_REQ_ACT_CPUFREQ]);
 			step->stats.consumed_energy = slurm_atoull(
 				step_row[STEP_REQ_CONSUMED_ENERGY]);
+			step->container = xstrdup(step_row[STEP_REQ_CONTAINER]);
 
 			if (step_row[STEP_REQ_TRES])
 				step->tres_alloc_str =