0
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?

dockerでGoファイルを実行する方法

Last updated at Posted at 2024-05-09

コンテナ内に入る

docker compose exec hogehoge bash

hogehogeはコンテナ名

結果

root@123456789:/app# 

123456789はコンテナID


Goファイルを実行

実行したいファイルが格納されているディレクトリに移動し、以下を実行

go run hogehoge.go
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?