From 2c1a17b94a6314b2577983b1dc8dfb5c2869f692 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 21 May 2021 18:13:39 +0100 Subject: [PATCH 1/3] gitignore /gtfstidy binary --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1377554..c6a035c 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.swp + +/gtfstidy \ No newline at end of file From 5423f1c8f505c04ea4cb841f925768e905657b29 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 21 May 2021 18:01:30 +0100 Subject: [PATCH 2/3] check in go.mod & go.sum --- go.mod | 9 +++++++++ go.sum | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 go.mod create mode 100644 go.sum diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b78761d --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module github.com/patrickbr/gtfstidy + +go 1.16 + +require ( + github.com/patrickbr/gtfsparser v0.0.0-20210503211936-d06c485ba62b + github.com/patrickbr/gtfswriter v0.0.0-20210407163711-6625630376c8 + github.com/spf13/pflag v1.0.5 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..9ab0813 --- /dev/null +++ b/go.sum @@ -0,0 +1,6 @@ +github.com/patrickbr/gtfsparser v0.0.0-20210503211936-d06c485ba62b h1:C9TB1Jd8i2Q+Mii0VufGWRY/70n+9UUfslAd/Spz4yU= +github.com/patrickbr/gtfsparser v0.0.0-20210503211936-d06c485ba62b/go.mod h1:L88c76QEIfk3Z5pr1S715jfv1EIEVZ7BvNiefxz4o3o= +github.com/patrickbr/gtfswriter v0.0.0-20210407163711-6625630376c8 h1:rennEshiJjXDi7r9FTZjz1yUY0jFxWWGNVuNCdSsnVw= +github.com/patrickbr/gtfswriter v0.0.0-20210407163711-6625630376c8/go.mod h1:zYAfZRXtDhc4Tq+LYrvyksefggNiViL2pKMRUrGvUbE= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= From 98460d7e296785370bb663e9cb756f0bb22b004e Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 21 May 2021 18:02:07 +0100 Subject: [PATCH 3/3] add Dockerfile --- .dockerignore | 8 ++++++++ Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4ebd6fb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +/.git +/.gitignore +/.travis.yml + +/processors/testfeed +/processors/testfeed-* +/**/*_test.go +/gtfstidy diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..823cebd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:alpine AS builder +WORKDIR /src + +RUN apk add --no-cache --update git + +COPY go.mod go.sum *.go ./ +COPY processors/ ./processors/ + +RUN go get +RUN CGO_ENABLED=0 go build -o /usr/local/bin/gtfstidy + +FROM scratch +LABEL org.opencontainers.image.title="gtfstidy" +LABEL org.opencontainers.image.description="A tool for checking, sanitizing and minimizing GTFS feeds." +LABEL org.opencontainers.image.authors="Patrick Brosi " +LABEL org.opencontainers.image.documentation="https://github.com/patrickbr/gtfstidy" +LABEL org.opencontainers.image.source="https://github.com/patrickbr/gtfstidy" +LABEL org.opencontainers.image.revision="v0.2" +LABEL org.opencontainers.image.licenses="GPL-2.0" + +COPY --from=builder /usr/local/bin/gtfstidy /usr/local/bin/gtfstidy + +ENTRYPOINT ["/usr/local/bin/gtfstidy"]