instruction: Create a Dockerfile for fundamentals
output: ```dockerfile
  from inside the container to outside the container.As an example, imagine you create a volume named log-data.
  
  $ docker volume create log-data
  When starting a container with the following command, the volume will be mounted (or attached) into the container at /logs:
  
  $ docker run -d -p 80:80 -v log-data:/logs docker/welcome-to-docker
  If the volume log-data doesn't exist, Docker will automatically create it for you.When the container runs, all files it writes into the /logs folder will be saved in this volume, outside of the container. If you delete the container and start a new container using the same volume, the files will still be there.Sharing files using volumesYou can attach the same volume to multiple containers to share files between containers. This might be helpful in scenarios such as log aggregation, data pipelines, or other event-driven applications.Managing volumesVolumes have their own lifecycle beyond that of containers and can grow quite large depending on the type of data and applications youâre using. The following commands will be helpful to manage volumes:docker volume ls - list all volumesdocker volume rm <volume-name-or-id> - remove a volume (only works when the volume is not attached to any containers)docker volume prune - remove all unused (unattached) volumesTry it outIn this guide, youâll practice creating and using volumes to persist data created by a Postgres container. When the database runs, it stores files into the /var/lib/postgresql/data directory. By attaching the volume here, you will be able to restart the container multiple times while keeping the data.Use volumesDownload and install Docker Desktop.Start a container using the Postgres image with the following command:
  
  $ docker run --name=db -e POSTGRES_PASSWORD=secret -d -v postgres_data:/var/lib/postgresql/data postgres
  This will start the database in the background, configure it with a password, and attach a volume to the directory PostgreSQL will persist the database files.Connect to the database by using the following command:
  
  $ docker exec -ti db psql -U postgres
  In the PostgreSQL command line, run the following to create a database table and insert two records:
  
  CREATE TABLE tasks (
   id SERIAL PRIMARY KEY,
   description VARCHAR(100)
  );
  INSERT INTO tasks (description) VALUES ('Finish work'), ('Have fun');Verify the data is in the database by running the following in the PostgreSQL command line:
  
  SELECT *
  ```