Список всех лиц доступен по ссылке.
+Перезапустив приложение можно добавить ещё в БД.
+ + diff --git a/2025-01/spring-33-docker/docker-compose-example/src/test/java/ru/otus/spring/docker/DockerComposeExampleApplicationTests.java b/2025-01/spring-33-docker/docker-compose-example/src/test/java/ru/otus/spring/docker/DockerComposeExampleApplicationTests.java new file mode 100644 index 00000000..93fe13c4 --- /dev/null +++ b/2025-01/spring-33-docker/docker-compose-example/src/test/java/ru/otus/spring/docker/DockerComposeExampleApplicationTests.java @@ -0,0 +1,15 @@ +package ru.otus.spring.docker; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +@AutoConfigureTestDatabase +class DockerComposeExampleApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/2025-01/spring-33-docker/helloWorld.txt b/2025-01/spring-33-docker/helloWorld.txt new file mode 100644 index 00000000..f2c3689e --- /dev/null +++ b/2025-01/spring-33-docker/helloWorld.txt @@ -0,0 +1,20 @@ +docker image ls +docker pull hello-world +docker image ls +docker image rm hello-world +docker ps +docker run hello-world +docker ps +docker run hello-world +docker ps -all +docker run --rm hello-world + +docker run -it --name=ubuntu-run ubuntu bash +docker start ubuntu-run +docker exec -it ubuntu-run bash + +docker run -d -p:8080:80 --name=my-nginx nginx +docker ps -a +curl http://localhost:8080 +docker kill my-nginx +docker rm my-nginx diff --git a/2025-01/spring-33-docker/image/Dockerfile b/2025-01/spring-33-docker/image/Dockerfile new file mode 100644 index 00000000..c51e4bde --- /dev/null +++ b/2025-01/spring-33-docker/image/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.11-alpine +COPY index.html /usr/share/nginx/html/index.html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/2025-01/spring-33-docker/image/index.html b/2025-01/spring-33-docker/image/index.html new file mode 100644 index 00000000..f3e333e8 --- /dev/null +++ b/2025-01/spring-33-docker/image/index.html @@ -0,0 +1 @@ +