This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reference: https://hub.docker.com/_/ubuntu/ | |
FROM python:3.8-slim-buster | |
# Adds metadata to the image as a key value pair example LABEL version="1.0" | |
LABEL maintainer="Rafael Novello <[email protected]>" | |
# Set environment variables | |
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import copy | |
class MementoMixin(object): | |
def __init__(self, *args, **kwargs): | |
self._history = [] | |
def commit(self): | |
self._history.append(copy.deepcopy(vars(self))) |