0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RedHat Enterprise LinuxのHTTPコンテナを実行する

Posted at

実行環境

  • Fedora Server
  • Podman

ログイン

初回のみregistry.redhat.comにログインする

[master@fedora ~]$ podman login registry.redhat.io
Username: [username]
Password: [password]
Login Succeeded!

Apache httpd 2.4のコンテナをpullする

[master@fedora ~]$ podman run -d -p 8080 registry.redhat.io/rhel8/httpd-24
Trying to pull registry.redhat.io/rhel8/httpd-24:latest...
Getting image source signatures
Copying blob 06038631a24a done
Copying blob 44115d860fce done
Copying blob 7220659c6858 done
Copying blob 262268b65bd5 done
Copying config b9c0594ea9 done
Writing manifest to image destination
Storing signatures
c85ee68e135b8416764405c3aeb520ef61cd53526ae76027b8ed9b072cc44c03

未ログインの場合

registry.redhat.ioに未ログインの場合、以下のように表示される。

podman run -d -p 8080 registry.redhat.io/rhel8/httpd-24
Trying to pull registry.redhat.io/rhel8/httpd-24:latest...
Error: Error initializing source docker://registry.redhat.io/rhel8/httpd-24:latest: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication

ポートを確認

バインドされたポートを確認する

[master@fedora ~]$ podman port -l
8080/tcp -> 0.0.0.0:[ランダムポート]

例)

[master@fedora ~]$ podman port -l
8080/tcp -> 0.0.0.0:45211
```

# 疎通確認
```
curl http://0.0.0.0:[ランダムポート]
```

例)

```
curl http://0.0.0.0:45211
```
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?