diff --git a/Tasks/5.Using volumes/README.md b/Tasks/5.Using volumes/README.md index 0aae573..7ca63ed 100644 --- a/Tasks/5.Using volumes/README.md +++ b/Tasks/5.Using volumes/README.md @@ -1,17 +1,17 @@ # Practice - using volumes -Run a container "mypsql" using **postgres:12** with options to: - - run the container in detached mode - - pass an environment variable `POSTGRES_PASSWORD=secretpass` - - create a named volume with `-v :/var/lib/postgresql/data` +Run a container **mypsql** using **postgres:12** with options to: + - run in detached mode + - pass the appropriate environment variable (find it on https://hub.docker.com/) + - use a named volume -Run a shell in the container and use psql to add a table and a record: +Run bash in the container and use psql to add a table and a record: - $ `psql -U postgres` - $ `create table public.films (id int PRIMARY KEY, name varchar(255));` - $ `insert into films(id, name) values(1, 'Some movie');` -Exit the container and delete it. Run a new container with the same options. Use ***the same*** volume name to re-use the existing volume. +Exit the container and delete it. Run a new container with the same options (use ***the same*** volume name). -Run a shell inside the container and see if your data is still there: +Run bash inside the new container and see if your data has survived: - $ `psql –U postgres` - $ `select * from public.films;`