Replatforming without a rewrite: when is containerizing a legacy application enough?

Replatforming a legacy application does not have to mean rewriting it. Containerization moves the system to a new platform with its business logic untouched, and makes its runtime visible along the way. I explain when it is the right move, when it only buys time, and why configuration is the hidden debt of legacy systems.

László Behán, Managing Director, FrontX | Reading time: 6 minutes

November 13, 2026

Containerizing a legacy application: replatforming without a rewrite, with business logic unchanged

Replatforming a legacy application does not have to mean rewriting it. If the business logic works and the problem is the runtime environment, containerization moves the system to a new platform with its code unchanged, at a fraction of the cost and risk of a native migration. It does not solve everything: it does not fix the code, it buys time. Done well, though, it exposes one of the most expensive hidden debts in legacy systems, configuration hard-coded into the application.

In brief

  • Containerization packages the runtime, it does not rewrite the code. It is the right choice when the business logic is sound but the platform or operations are not.
  • A Dockerfile is executable documentation of a legacy system's runtime. For many old systems, it is the first accurate description of what the application actually needs.
  • Much of the benefit often comes not from the container itself, but from moving hard-coded environment settings out of the code.
  • If the problem is in the code, for example nobody understands it or it cannot be extended, a container only buys time.

Replatforming does not have to mean a rewrite

When an old system has to move to a new environment, the discussion often narrows to two extremes: leave it alone or rewrite it. Cloud migration practice is more nuanced. AWS, for example, distinguishes seven strategies: retire, retain, rehost, relocate, repurchase, replatform and refactor.

Containerizing a legacy application sits between rehost and replatform. The code essentially stays the same, but its runtime changes: the application server, the Java version, the dependencies and the settings go into a container image that starts the same way on any machine that can run containers.

That matters because the main value of a legacy system is usually its business logic: rules, exceptions and fixes accumulated over years. Rewriting it is expensive and, worse, risky. What a rewrite reliably loses is the knowledge nobody documented and only the code contains.

A real example: two Java applications from Windows to Linux

At a large Hungarian state-owned company, two legacy Java back-office registry applications ran on Java 11, the Payara application server and PostgreSQL, on Windows servers. The runtime had to move to Linux. A native port would have meant a very large amount of work, and the applications were also slow and hard to operate.

In the project, a shared Docker layer was built for both applications without touching the business logic. With Git and Nexus integration, deployment became a simple, step-by-step process. The project took about five months including testing, with a project manager, a database architect and a Java developer from FrontX.

The result: both applications moved to the new environment without a native migration, became portable, run with better performance, and share the same layer.

Configuration is the hidden debt of legacy systems

The most instructive part of the project was not the container itself. It turned out that environment settings, including the SP integration, the mobile app integration, file server paths and server parameters, were hard-coded. Every change to the environment needed a developer.

You cannot sensibly put an application like that in a container. The whole point of a container is that the same image runs in test and production, with only the settings changing. So those settings had to move into an external setup file. From then on, changing a path or an integration endpoint became an operations task, not a development task.

In our experience, this is true of many old systems. Hard-coded configuration never shows up on the risk register, yet it is what makes test environments expensive, deployments slow and every infrastructure change risky. Containerization forces you to deal with it.

The Dockerfile as documentation

With a legacy system, nobody can often say exactly what the application needs to run. Which Java version, which add-ons, which directory it reads from, which environment variables it expects. That knowledge is scattered across old installation notes, the heads of operations staff, and a server nobody has touched in years.

A Dockerfile writes it down in one place, in executable form. If the container starts, the description is accurate. For many old systems, this is the first reliable documentation of the runtime, and it keeps its value even if the system is replaced later.

In financial services this carries extra weight. Article 8 of DORA requires financial entities to identify and document their ICT assets and their dependencies, and services supporting critical or important functions need an exit strategy. A containerized application has a documented, portable runtime, which helps with both.

When is containerization enough, and when is it not?

FactorContainerization is a good stepYou need something else
Business logicWorks well, no need to change itWill change significantly
Main problemPlatform, operations, deploymentMaintainability of the code
KnowledgePeople still understand the code, only the environment is unknownNobody understands the code
DependenciesStandard runtime (e.g. JVM, application server)OS-specific components, special hardware
Time horizonNeeded for a few more years, or a staged replacement is plannedLong-term strategic system with many new features

If the right-hand column fits better, the container only postpones the decision. That is not necessarily bad if it is deliberate: alongside a containerized system, it is easier to replace old functions gradually, module by module. The mistake is to call containerization modernisation while the problems in the code keep growing.

There are two things a container will not do. It will not spare you runtime upgrades: an old Java version is still old inside a container, and the image has to be part of vulnerability management like anything else. And it will not make bad code better, only easier to deploy. We wrote more about this in when not to modernise a legacy system.

What we do differently at FrontX

  • We protect the business logic. When replatforming, our first question is what knowledge only the code holds, and how we carry it over unchanged.
  • We move configuration out. Hard-coded environment settings go into an external file or configuration service, because that is what makes the system genuinely portable.
  • We build shared layers where we can. If several applications have similar runtimes, one well-designed shared layer can cover the modernisation of several systems.
  • We say so when a container is not enough. If the problem is in the code, we say that rather than sell the packaging. That is the basis of our legacy modernisation and support service.

If you need to move an old system to a new platform and are not sure whether containerization is enough, we are happy to look at it with you: book a free consultation.

Frequently asked questions

What does containerizing a legacy application mean?

The application and its full runtime, such as the Java version, the application server and its dependencies, are packaged into a container image that runs the same way on any container platform. The code essentially does not change, so the business logic stays intact.

What is the difference between rehost, replatform and refactor?

Rehost moves an application to new infrastructure without changes. Replatform moves it to a new platform, such as containers or a managed database, with minor modifications. Refactor changes the application's architecture or code. Containerization typically sits between rehost and replatform.

When is containerization not enough?

When the business logic needs to change significantly, when nobody understands the code or it cannot be extended, or when the application depends on OS-specific components. In those cases a container at best buys time for real modernisation.

Does containerization make a legacy application more secure?

Not by itself. A container isolates the runtime and makes it describable, but vulnerabilities in old components remain. The image has to be updated and scanned like any other system component.

How long does it take to containerize a legacy application?

It depends on the size of the application, how much configuration is hard-coded and how much testing is needed. In one of our projects, containerizing two Java applications took about five months including testing.

László Behán is Managing Director and Co-Founder of FrontX Kft. He was previously CIO of Signal Insurance, Deputy IT Director and Head of Development at Groupama Insurance, and Operations Director and board member at LeasePlan Hungaria. He has 20 years of IT and business leadership experience in financial services. LinkedIn profile

Szoftverfejlesztők csapatmunkában

Let's talk about your project

If this article reflected your own situation, let's talk it through. A free, no-obligation consultation with concrete recommendations.
Book a free consultation