https://github.com/lmbishop/fsad2
https://github.com/lmbishop/fsad2
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/lmbishop/fsad2
- Owner: LMBishop
- Created: 2022-04-21T21:50:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-21T22:11:50.000Z (over 4 years ago)
- Last Synced: 2025-07-20T03:08:17.650Z (about 1 year ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Prerequisites
* Docker
* A machine running Linux or macOS, or familiarity with Docker
## Instructions
1. Clone this repository
2. Move (or copy) your script ending in `.sql` into the repo directory
3. Extract the data files into a subdirectory called `data`
Your directory structure should look like this:
```
.
├── data
│ ├── Batches.csv
│ ├── ...
├── Dockerfile
├── docker-entrypoint.sh
├── assignment.sql
├── README.md
└── run.sh
```
### Linux/macOS
Run the script `run.sh`.
```
./run.sh
```
The script will look for any file ending in `.sql` in your working directory and use the first one.
Options:
* `-i` non interactive mode
* Runs the container in non-interactive mode.
* `-s` skip image build
* Skips building the image (or checking if it needs to be rebuilt), saving a few seconds. Make sure it has already been built and tagged `fsad` before.
* `-f [file name]` use file
* Uses `file name` instead of automatically detecting one
### Windows
Build the image.
```
docker build -t fsad .
```
Start a container with the image. Your sql file should be mounted at `/app/file.sql`.
```
docker run -it -v [wherever the file is]:/app/file.sql --name=fsad fsad
```
Once finished, remove the container if you are not going to reuse it again.