Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Dockerfile and docker-compose config #3

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

afred
Copy link

@afred afred commented Nov 19, 2024

This is just a starting point for running SWT in docker as an alternative to installing Python virtual environments.

Build image (if not already built) and start an interactive bash shell with the host's current working directory mounted to /usr/src/app/. No ports forwarded by default, but feel free to add if it makes sense. Note the --rm option will automatically remove the image once it stops, which avoids clutter for unused images over time.

docker-compose run --rm dev

Start it in one window, connect in another....

# In first terminal...
# Ctrl+C or closing termrinal window stops the container. Can view STDOUT.
docker-compose up dev

# In 2nd terminal...
# Shell into running container.
# Ctrl+C closes session, but does not stop container
docker exec -it clams-kitchen-dev-1 bash

Rebuild the image as needed.

docker-compose build --no-cache dev

This is just a starting point for running SWT in docker as an alternative to installing
Python virtual environments.

Build image (if not already built) and start an interactive `bash` shell with the host's
current working directory mounted to `/usr/src/app/`. No ports forwarded by default, but
feel free to add if it makes sense. Note the `--rm` option will automatically remove the
image once it stops, which avoids clutter for unused images over time.

    docker-compose run --rm dev

Start it in one window, connect in another....

    # In first terminal...
    # Ctrl+C or closing termrinal window stops the container. Can view STDOUT.
    docker-compose up dev

    # In 2nd terminal...
    # Shell into running container.
    # Ctrl+C closes session, but does not stop container
    docker exec -it clams-kitchen-dev-1 bash

Rebuild the image as needed.

    docker-compose build --no-cache dev
@afred afred marked this pull request as draft November 19, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant