Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Docker image for Python Behavior Driven Development Pipeline
FROM rofrano/nyu-devops-base:sp23

RUN sudo apt-get update && \
sudo apt-get install -y chromium-driver python3-selenium
# This build image needs to be root
USER root

RUN apt-get update && \
apt-get install -y chromium-driver python3-selenium

WORKDIR /app

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## ----------------------------------------------------------------------
## Builder for creating Docker images that behave similar to Virtual
## Machines for use with Vagrant. This takes advantage if the buildx
## builder in docker which can cross-compile images for other targets.
## Builder for creating Docker images on multiple platform architectures.
## This takes advantage if the buildx builder in docker which can
## cross-compile images for other targets.
## ----------------------------------------------------------------------

# These can be overidden with env vars.
Expand Down Expand Up @@ -42,9 +42,9 @@ build: ## Build all of the project Docker images
docker buildx build --pull --platform=$(PLATFORM) --tag $(IMAGE) --push .

.PHONY: run
run: ## Run a vagrant VM using this image
run: ## Run a container using this image
$(info Bringing up container with Docker...)
docker run --rm -v $(PWD)/app -w /app $(IMAGE) bash
docker run --rm -it -h nyu --user vscode -v $(PWD):/app -w /app $(IMAGE) bash

.PHONY: remove
remove: ## Stop and remove the buildx builder
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Your test job should look something like this:
To run locally use:

```sh
docker run --rm -it -v $(pwd):/app -w /app rofrano/pipeline-selenium bash
docker run --rm -it -h nyu --user vscode -v $(pwd):/app -w /app rofrano/pipeline-selenium bash
```

That will leave you at a `bash` prompt in the `/app` folder shared with your current working directory so that you can `pip install` your dependencies and start your testing.
That will place you inside the container as the user `vscode` sitting at a `bash` prompt in the `/app` folder that has been shared with your current working directory so that you can `pip install` your dependencies and start your testing.

## License

Copyright (c) 2022, John Rofrano. All rights reserved.
Copyright (c) 2022, 2023 John Rofrano. All rights reserved.

Licensed under the Apache License. See [LICENSE](LICENSE)

This repo is part of the NYU masters class: **CSCI-GA.2820-001 DevOps and Agile Methodologies** created by *John Rofrano*
This repo is part of the NYU masters class: **CSCI-GA.2820-001 DevOps and Agile Methodologies** created by *John Rofrano*