Skip to content

jordanistan/astrophotography

Repository files navigation

Astrophotography

 

Astrophotography

Github top language Github language count Repository size License

About   |   Requirements   |   Starting   |   License   |   Author


🎯 About

Here's a Python script that allows you to input the number of photos and the exposure time for each photo. It will then calculate the total time required for taking all the photos.

🏁 Starting

Clone this project

$ git clone https://github.com/jordanistan/astrophotography

Access

$ cd astrophotography

#Create a Dockerfile: First, you need a Dockerfile to build a Python environment.

Dockerfile

# Use an official Python runtime as a parent image
FROM python:3.8

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the current directory contents into the container at /usr/src/app
COPY . .

# Run the script when the container launches
CMD ["python", "./time-teller.py"]

Create a docker-compose.yml File: Next, create a docker-compose.yml file to define the service.

version: '3.8'
services:
  python-app:
    build: .
    stdin_open: true
    tty: true

This Compose file defines one service python-app, which is built from the Dockerfile in the current directory. stdin_open and tty are set to true to allow interactive input (like input() in your Python script).

Place Your Python Script in the Same Directory: Ensure your Python script (your_script.py) is in the same directory as your Dockerfile and docker-compose.yml.

Running the Docker Compose: To run your Docker Compose, use the following commands in the directory where your files are located:

docker-compose build
docker-compose up -d
docker exec -ti astrophotography-time-teller-1 python time-teller.py

This setup will create a Docker container that runs your Python script, allowing for interactive input as required by your script. Remember to install any additional Python packages you might need by updating the Dockerfile accordingly (using RUN pip install commands).

Made with ❤️ by Jordan

 

Back to top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages