We study the structure of linear codes over the ring B k which is defined by. In order to study the codes, we begin with studying the structure of the ring B k via a Gray map which also induces a relation between codes over B k and codes over F p r . We consider Euclidean and Hermitian self-dual codes, MacWilliams relations, as well as Singleton-type bounds for these codes. Further, we characterize cyclic and quasi-cyclic codes using their images under the Gray map, and give the generators for these type of codes.