From 70e9fe7cc38e58ab7d4ee31853c0f167e2388cf2 Mon Sep 17 00:00:00 2001 From: John Bradley Date: Thu, 3 Nov 2022 09:31:22 -0400 Subject: [PATCH] Simplify Dockerfile usage Adds dm_formatter.py to PATH so users can run it directly. Also adds metadata to the Docker container. --- Dockerfile | 7 ++++++- dm_formatter.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 dm_formatter.py diff --git a/Dockerfile b/Dockerfile index 20f3d38..128af8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ FROM python:3.8.10-slim-buster +LABEL "org.opencontainers.image.authors"="John Bradley " +LABEL "org.opencontainers.image.description"="Tool to reformat drexel metadata JSON files" WORKDIR /pipeline +# ADD scripts in /pipeline to the PATH +ENV PATH="/pipeline:${PATH}" + COPY dm_formatter.py /pipeline -CMD echo "python dm_formatter.py input output" +CMD echo "dm_formatter.py input output" diff --git a/dm_formatter.py b/dm_formatter.py old mode 100644 new mode 100755 index 7b46628..316e546 --- a/dm_formatter.py +++ b/dm_formatter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Convert drexel_metadata JSON file to BGNN minnow metadata JSON file import json import argparse