Modify marketplace droplet

Posted February 24, 2020 1.1k views
LAMP StackCustom Images

Is it possible to take the existing LAMP stack image from the marketplace. modifiy it and save it as a cutom image?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there @SamKemp55,

What you could do is create a new Droplet with the LAMP image, then SSH to the droplet and make the necessary changes. After that shut down the droplet and take a snapshot.

Finally, you will be able to use this snapshot as a base image and spin up new Droplets from it. You can take a look at the official documentation on how to do that here:

Hope that this helps!

  • Hi @bobbyiliev

    Thank you for your reply. That solution would be wonderful.
    I didn’t realise snapshots could be used that way, I assumed they were stuck within a single droplet

    Is it possible to do this but also have a command run after the server has started?

    • Hi there @SamKemp55,

      Yes, it should be ok to run a command on boot. For example, you could create a systemd startup script to do that.

      Another approach that you could consider is to rather than using a snapshot is to use Ansible, for example, to set up your new Droplets with a preset of packages. That way you would not need to keep a snapshot under your account at all times, and you will use Ansible playbook to install the packages for you on your new Droplets.

      IF you are interested, you could take a look at this tutorial here on how to use Ansible to automate initial server setups:

      Hope that this helps!

      by Erika Heidi
      Ansible offers a simple architecture that doesn't require special software to be installed on nodes. It also provides a robust set of features and built-in modules which facilitate writing automation scripts. This guide explains how to use Ansible to automate the steps contained in our Initial Server Setup Guide for Ubuntu 18.04 servers.