Skip to content

Instantly share code, notes, and snippets.

@dallasmarlow
Created June 20, 2021 23:29
Show Gist options
  • Save dallasmarlow/aa0e8865491ae11fe2d46d291467726c to your computer and use it in GitHub Desktop.
Save dallasmarlow/aa0e8865491ae11fe2d46d291467726c to your computer and use it in GitHub Desktop.
simple python Makefile
FROM debian:buster-slim
RUN apt-get update && \
apt-get install -y python3-pip && \
pip3 install autopep8
.DEFAULT_GOAL := push
DIR = $(shell pwd)
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
base_img := debian:buster-slim
img := abc
build: pull
docker build -t ${img} .
pull:
docker pull ${base_img}
push: build
docker push ${img}
fmt: ${DIR}/*.py
docker build -t autopep8 -f autopep8.docker .
for f in $^ ; do \
docker run \
--rm \
-v ${DIR}:${DIR} \
autopep8 \
autopep8 --in-place $${f} ; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment