if you are only able to edit the template, use inline styling like this:
<div class="container" style="background-color:#f6f7f9;"><%= documentHTML %></div>
or since your template is the whole page, you can add custom styles in the head and use !important directive to override any other custom styling.
example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
<%= documentHTML %>
</title>
<link rel="stylesheet" href="https://stackedit.io/res-min/themes/base.css" />
<script type="text/javascript" src="https://stackedit.io/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
<style type="text/css">
.container {
background-color:#f6f7f9 !important;
}
</style>
</head>
<body>
<div class="container">
<%= documentHTML %>
</div>
</body>
</html>