December 10, 2020 By Zhuang Yu
Simon Moser
Michael Behrendt
3 min read

Stop worrying about CVEs and get back to coding.

The use of containers is growing quickly as more and more companies are transitioning to the cloud. And with more and more critical workloads being containerized, security remains one of the biggest challenges. While containers are great, they come with their own set of security issues. In particular, making sure that your container images contain no vulnerabilities is a difficult issue, and one that is easily overlooked. 

Developers love writing code, but are often not very interested or motivated when it comes to creating truly secure container images, which can be complicated and time-consuming. In this article, we’ll explain how to use IBM’s latest serverless container platform, IBM Cloud Code Engine, to solve this issue.

IBM Cloud Code Engine

IBM Cloud Code Engine is a fully managed, serverless platform that can host all of your cloud native workloads. The user experience is developer-centric and designed so that you focus on writing code instead of dealing with the underlying infrastructure and its security.

Let’s look at your options to run applications on IBM Code Engine: 

  1. You have a prebuilt image in a container registry (e.g., IBM Cloud Container Registry or dockerhub) and want to deploy it.
  2. You have source code in a repository (e.g., GitHub) and a Dockerfile that contains the build instructions.
  3. You have your source code in a repository (e.g., GitHub) . . .  and nothing else. 

All of these options come with different security and maintenance trade-offs, as outlined in the table above. Options 1 and 2 give you the biggest flexibility in terms of what can be deployed, but come at a cost. You need a build system to generate the container image, and you have the responsibility for all of its contents (e.g., for the application framework, dependencies, and base OS image layers). While some container registries (like the IBM Cloud Container Registry) help with scanning the image and then alerting you about potential vulnerabilities, the responsibility of continuously addressing these security issues is still yours.

In contrast, let’s consider option 3 in the table above and use a Java application as an example. You provide the source code and its direct dependencies and let Code Engine do the rest. All the underlying layers (operating systems, JRE, etc.) are now provided and secured by IBM. This significantly lowers your cost of maintenance and strengthens your security posture. The fewer layers you provide yourself, the fewer responsibilities you will have. 

Currently, IBM Code Engine supports two build strategies, addressing options 2 and 3 above: 

To use the “Dockerfile build”, you provide the application source code and a Dockerfile with your build instructions. Compared to option 1, this shifts more of the security burden to IBM (the builds will be run in a rootless and Docker deamonless approach). However, the responsibility for the application framework, dependencies, and base OS image is still yours, and you will need to continuously monitor for any new vulnerabilities and then remediate them effectively and quickly.

If you chose the “Cloud Native Buildpacks” option, all you need to provide is your source code. The Cloud Native Buildpack will detect your application language, pick a specific builder, and build an image on a base OS. IBM provides all layers underneath your source code and, therefore, takes the responsibility to maintain their security (e.g., providing an updated JRE in case of a vulnerability). 

The resulting image is stored in your container registry, and if a new vulnerability occurs, it will be flagged. All you need to do is click “rebuild” to re-deploy your code on an updated and secured image (which might even be fully automated through a new option in the future).

Summary

IBM Cloud Code Engine provides three choices to run your containerized workload. If you already have an image in a registry, just run it on Code Engine “as is”. But we’d like to encourage you to use the build option and have Code Engine run container image builds for you. This will free you from the responsibility to continuously find and fix container image vulnerability issues yourself.

You can get back to what you love and focus on writing code. In a future blog post, we’ll go into more details and take a look at how IBM Cloud Code Engine actually executes the builds.

Learn more and try it out

Read “IBM Cloud Code Engine: Enjoy Your Cloud Again” to learn more and head on over to the Getting started with IBM Cloud Code Engine.

Ready to try it out? Go to “Build Container image” in IBM Code Engine. 

IBM Cloud Code Engine is built on open-source technologies, like Shipwright-io/build, Tekton, Kaniko, or Paketo.

Was this article helpful?
YesNo

More from Cloud

Harnessing XaaS to reduce costs, risks and complexity

3 min read - To drive fast-paced innovation, enterprises are demanding models that focus on business outcomes, as opposed to only measuring IT results. At the same time, these enterprises are under increasing pressure to redesign their IT estates in order to lower cost and risk and reduce complexity. To meet these challenges, Everything as a Service (XaaS) is emerging as the solution that can help address these challenges by simplifying operations, reducing risk and accelerating digital transformation. According to an IDC white paper…

IBM Cloud Virtual Servers and Intel launch new custom cloud sandbox

4 min read - A new sandbox that uses IBM Cloud Virtual Servers for VPC invites customers into a nonproduction environment to test the performance of 2nd Gen and 4th Gen Intel® Xeon® processors across various applications. Addressing performance concerns in a test environment Performance testing is crucial to understanding the efficiency of complex applications inside your cloud hosting environment. Yes, even in managed enterprise environments like IBM Cloud®. Although we can deliver the latest hardware and software across global data centers designed for…

10 industries that use distributed computing

6 min read - Distributed computing is a process that uses numerous computing resources in different operating locations to mimic the processes of a single computer. Distributed computing assembles different computers, servers and computer networks to accomplish computing tasks of widely varying sizes and purposes. Distributed computing even works in the cloud. And while it’s true that distributed cloud computing and cloud computing are essentially the same in theory, in practice, they differ in their global reach, with distributed cloud computing able to extend…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters