1
0

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 5 years have passed since last update.

openrestyコンテナを動かす

Posted at

環境

あらすじ

Docker Hubのopenresty/openrestyコンテナをrunするも落ちる

試したimageたち

  • openresty/openresty latest feebb0109819
  • openresty/openresty 1.13.6.2-2-alpine-fat bbd570a716e8
  • openresty/openresty 1.13.6.2-2-alpine a339c66710f6
  • openresty/openresty alpine-fat cd2775f53e7b
  • openresty/openresty alpine 00e4e0b735c3

動作

  • docker run するも数秒後に終了する。
  • run自体には成功しいそう(docker.log上はerrorにはなっておらず、startしてstopしている)
docker.log
time="2018-12-12T11:21:16Z" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/f75d65a916aaea1d08ef9dd045c2c525c5ca5191c2e0fee888dda014237dcbd4/shim.sock" debug=false pid=25735
time="2018-12-12T11:21:19Z" level=info msg="shim reaped" id=f75d65a916aaea1d08ef9dd045c2c525c5ca5191c2e0fee888dda014237dcbd4
time="2018-12-12T11:21:19.422010008Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
  • コンテナ内でshからopenrestyを起動してみるとIllegal instructionのエラー
# /usr/local/openresty/bin/openresty
Illegal instruction

解決できず断念。

GitHubからDockerfileをcloneしてbuildしたイメージをrunしたら動作

  • ソースをclone
  • buildしてrunしてアクセスしてみる
# docker build -t openresty-test -f alpine/Dockerfile .
# docker run -p 80:80 openresty-test
# docker run -p 80:80 openresty-test192.168.11.1 - - [12/Dec/2018:11:29:08 +0000] " " 400 179 "-" "-"
192.168.11.10 - - [12/Dec/2018:11:29:32 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36"
192.168.11.12 - - [12/Dec/2018:11:29:57 +0000] "GET / HTTP/1.1" 200 649 "-" "curl/7.62.0"
# curl http://192.168.11.12
<!DOCTYPE html>
<html>
<head>
<title>Welcome to OpenResty!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to OpenResty!</h1>
<p>If you see this page, the OpenResty web platform is successfully installed and
working. Further configuration is required.</p>

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

<p><em>Thank you for flying OpenResty.</em></p>
</body>
</html>
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?