LoginSignup
0
0

More than 1 year has passed since last update.

Podmanでnginxを動かす

Posted at

この記事はWindows10でHyper-Vを起動させ、そのHyper-V上にRHEL8.4をインストールした環境でテストを実施したものです。

podmanをインストールしておく。

qiita.rb
$ sudo dnf install podman
$ podman --version
podman version 3.2.3

nginxコンテナ起動、イメージの確認。コンテナリストの確認。

qiita.rb
$ podman run -d -p 8080:80 --name test_nginx nginx
$ podman images
REPOSITORY               TAG         IMAGE ID      CREATED      SIZE
docker.io/library/nginx  latest      dd34e67e3371  11 days ago  137 MB
$ podman ps
CONTAINER ID  IMAGE                           COMMAND               CREATED         STATUS             PORTS                 NAMES
1baef88e8fba  docker.io/library/nginx:latest  nginx -g daemon o...  26 minutes ago  Up 26 minutes ago  0.0.0.0:8080->80/tcp  test_nginx

curlで稼働確認を実施。

qiita.rb
$ curl http://localhost:8080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0