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 1 year has passed since last update.

dockerイメージ作成

Posted at

#Dockerイメージファイルからコンテナ起動

dockerフォルダにindex.html,Dockrefireファイルを作成する

dockerフォルダ
FROM httpd
COPY index.html /usr/local/apache2/htdocs/

Dockerfileでbuildする

$ docker build -t myimage:1.0 .

$ docker build -t [イメージ名]:[タグ(省略可)] [dockerディレクトリ]

作成したイメージで、コンテナ起動

$ docker run -dit --name web -p 8080:80 myimage:1.0

docker実行フォルダのindex.html表示
http://localhost:8080/

#Dockerイメージファイルからlaravelのコンテナ起動

$ git clone https://github.com/ucan-lab/docker-laravel.git
$ cd docker-laravel
$ make create-project

http://localhost

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?