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

Python細かいことはこだわらない環境メモ

1
Posted at

概要

  • Pythonコード書く際に細かいことはこだわらずに環境を作りたい
    • AWSのLambda関数とか
  • TODO: lintなど入れたい

docker-compose.yml

touch docker-compose.yml

コンテナを使い回したいので stdin_open: true とする。
docker compose run で毎度起動するなら不要。

docker-compose.yml
version: '3'

services:
  app:
    image: python:3.7-alpine
    volumes:
      - .:/webapp
    working_dir: /webapp
    environment:
      TZ: 'Asia/Tokyo'
    stdin_open: true

実行ファイル

index.py
print('hoge')

コンテナ内で動作確認できる。

python index.py
# hoge
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?