-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (17 loc) · 733 Bytes
/
Dockerfile
File metadata and controls
26 lines (17 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3
LABEL maintainer="[MAINTAINER_NAME]"
COPY ./requirements.txt /app/
COPY ./mysql_faker.py /app/
WORKDIR /app
RUN pip install -r requirements.txt
ENV DB_USER "<user>"
ENV DB_PASS "<password>"
ENV DB_NAME "<db name>"
# Note that SQL_HOST is not needed IF you're connecting to
# a localhost db or Cloud SQL Proxy AND you're not using Docker on MacOS
# Docker on MacOS uses hypervisor and doesn't share network with
# the host machine even when you set -net=host
# Uncomment SQL_HOST line and specify the IP to connect to
#ENV SQL_HOST "<database IP>"
# passing the --auto flag to remove interactivity from the script
CMD [ "python", "mysql_faker.py", "--auto", "--locations=10", "--employees=100", "--dontclean" ]