How to make a container | LinQhost guide

Creating a container

Containers are a powerful tool for running applications quickly and consistently. But how do you actually create one? In this guide, we explain it step by step. Whether you use LinQhost's Managed CICD service or get started yourself, we'll help you get started!

Step 1 - Choose a good base image

Everything starts with a base image. This is the foundation of your container. LinQhost offers lightweight containers with a web server and PHP 8.1 or 8.2, ideal for many web applications. In the Dockerfile you specify:
  1. Which base image you are using.
  2. What additional software is needed.
  3. How your own code is loaded.

Running the image locally allows you to test how everything works before proceeding.

Step 2 - Build and test your container locally

Once your Dockerfile is ready, you can build and test your container locally. Check that everything is running smoothly and that your application is working as expected. If you are satisfied, it is time to commit the code to a git repository.

Step 3 - Upload to a Container Registry

With the LinQhost Managed CICD service, we ensure that your container is directly in the cloud. Would you rather keep control yourself? No problem:
  1. Push the container to a Container Registry such as Docker Hub or a private registry.
  2. Optionally, set up your own pipeline to automate the process.

Need advice? Our team is here to help!

Common mistakes

  1. Choosing the wrong base image: This can lead to compatibility issues.
  2. Insufficient testing: Test your container locally before pushing it to the cloud.
  3. No security: Make sure your images are up to date and use a reliable registry.

By following these steps, you will build a container that is robust and efficient.

    • Related Articles

    • Deploying Containers

      Want to use containers to host your applications? Containers are super handy, but there are a few things you need to keep in mind. We explain step by step how to deploy and maintain containers. What you need to know about containers Containers are ...
    • LinQhost's cloud services offering

      At LinQhost, we make your cloud experience simple and effective. We rely on Google Cloud for all our cloud hosting services. Whether you are looking for storage, management or security, we have everything you need to keep your projects running ...