Skip to content

Commit

Permalink
Merge pull request #2 from Lucas-Palomo/master
Browse files Browse the repository at this point in the history
Otimizações no Dockerfile
  • Loading branch information
greatjapa authored Sep 6, 2020
2 parents 7420fc6 + 43b564e commit 4a68def
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
23 changes: 8 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
FROM ubuntu

RUN apt-get update && apt-get install -y python3.6 python3-pip
RUN apt-get install --assume-yes git
RUN pip3 install setuptools pip --upgrade --force-reinstall

WORKDIR /usr/src/app

RUN git clone https://github.com/eaglebh/blast-dbf.git
RUN cd blast-dbf && make

COPY requirements.txt /usr/src/app/requirements.txt
COPY dbc2dbf.sh /usr/src/app/dbc2dbf.sh
COPY dbf2csv.py /usr/src/app/dbf2csv.py
COPY Makefile /usr/src/app/Makefile

RUN pip3 install -r requirements.txt
COPY ["requirements.txt", "dbc2dbf.sh", "dbf2csv.py", "Makefile", "./"]
RUN apt-get update && \
apt-get install --assume-yes python3 python3-pip git && \
pip3 install setuptools pip --upgrade --force-reinstall && \
git clone https://github.com/eaglebh/blast-dbf.git && \
cd blast-dbf && \
make && \
pip3 install -r ../requirements.txt
4 changes: 2 additions & 2 deletions dbf2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

for file in os.listdir("data"):
if file.endswith(".dbf"):
dbf = Dbf5("data/" + file, codec='latin-1')
dbf = Dbf5("data/" + file, codec='utf-8')
dbf.to_csv("data/csv/" + os.path.splitext(file)[0] + ".csv")
print("data/" + file + " converted to csv")
print("data/" + file + " converted to csv")

0 comments on commit 4a68def

Please sign in to comment.