// Metadata created by nebel
// ParentAssemblies: assemblies/getting-started/as_installing-the-registry.adoc

[id="installing-registry-in-memory-storage"]
= Installing {registry} with in-memory storage

This section explains how to install and run {registry} with simple in-memory storage from a container image. 

NOTE: The in-memory storage option is suitable for development only. All data is lost when the container image is restarted.  

.Prerequisites

* You must have Docker installed and the Docker daemon running.
* Ensure that you can connect to the container repository: https://hub.docker.com/r/apicurio/apicurio-registry-mem.

.Procedure

. Get the {registry} container image:
+
[source,bash]
----
$ docker pull apicurio/apicurio-registry-mem
----
. Run the container image: 
+
[source,bash]
----
$ docker run -it -p 8080:8080 apicurio/apicurio-registry-mem:latest
----

. Send a test request using the {registry} REST API. For example, enter the following `curl` command to create a simple Avro schema artifact for a share price application in the registry:
+
[source,bash]
----
$ curl -X POST -H "Content-type: application/json; artifactType=AVRO" -H "X-Registry-ArtifactId: share-price" --data '{"type":"record","name":"price","namespace":"com.example","fields":[{"name":"symbol","type":"string"},{"name":"price","type":"string"}]}' http://localhost:8080/artifacts
----
. Verify that the response includes the expected JSON body to confirm that the Avro schema artifact was created in the registry. For example:
+
[source,bash]
----
{"createdOn":1578310374517,"modifiedOn":1578310374517,"id":"share-price","version":1,"type":"AVRO","globalId":8}
----

.Additional resources
* For more REST API sample requests, see the link:files/registry-rest-api.htm[Registry REST API documentation].
* For a demo based on Kafka Streams storage, see link:https://github.com/Apicurio/apicurio-registry-demo[].
