Ejemplo n.º 1
0
 def _create_image(dockerfile_mode="actual"):
     img = Image()
     img.id = image_id
     img.user_id = user
     img.dockerfile_contents = dockerfile_contents
     img.dockerfile_mode = dockerfile_mode
     return img
Ejemplo n.º 2
0
def alpine_image():
    img = Image()
    img.distro_name = "alpine"
    img.distro_version = "3.10"
    img.id = "abc123abc123"
    img.analysis_artifacts = []
    img.digest = "sha256:abc123abc123"
    img.created_at = datetime.datetime.utcnow()
    img.last_modified = img.created_at
    img.cpes = []
    img.docker_data_json = {}
    img.dockerfile_contents = ""
    img.dockerfile_mode = "guessed"
    img.docker_history_json = []
    img.packages = []
    img.gems = []
    img.npms = []
    img.state = "analyzed"
    img.size = "1000"
    img.user_id = "admin"
    return img