Skip to content

Commit

Permalink
fix(docker): update Dockerfile and docker-compose files for app; chor…
Browse files Browse the repository at this point in the history
…e(docker): add docker-build and docker-config rules;
  • Loading branch information
entelecheia committed May 18, 2023
1 parent 15cee29 commit 5b5a31e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .docker/Dockerfile.app
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ ENV APP_CLONE_DIR $ARG_APP_CLONE_DIR
# Sets the working directory to workspace root
WORKDIR $WORKSPACE_ROOT
# Copies scripts from host into the image
COPY ./.docker/scripts/ ./scripts/
COPY ./.docker/.docker-scripts/ ./.docker-scripts/
# Installs Python dependencies listed in requirements.txt
RUN pip install -r ./scripts/requirements.txt
RUN pip install -r ./.docker-scripts/requirements.txt

# Clones the stable-diffusion-webui repository from GitHub
RUN git clone "https://github.com/$APP_GITHUB_USERNAME/$APP_GITHUB_REPO.git" $APP_PROJECT_ROOT/$APP_CLONE_DIR
Expand Down
2 changes: 1 addition & 1 deletion .docker/docker-compose-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
# Sets the build context to the current directory
context: .
# Specifies the Dockerfile to use for the build
dockerfile: .docker/Dockerfile
dockerfile: .docker/Dockerfile.app
# Specifies build-time variables (ARGs)
args:
ARG_BUILD_FROM: $BUILD_FROM
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@ init-project: initialize ## initialize the project (Warning: do this only once!)

reinit-project: install-copier ## reinitialize the project (Warning: this may overwrite existing files!)
@bash -c 'args=(); while IFS= read -r file; do args+=("--skip" "$$file"); done < .copierignore; copier "$${args[@]}" --answers-file .copier-config.yaml --vcs-ref=HEAD gh:entelecheia/hyperfast-docker-template .'

##@ Docker

docker-build: ## build the docker image
@bash -c 'set -a; source .docker/docker.app.env; set +a; docker-compose --project-directory . -f .docker/docker-compose-app.yaml build'

docker-config: ## show the docker config
@bash -c 'set -a; source .docker/docker.app.env; set +a; docker-compose --project-directory . -f .docker/docker-compose-app.yaml config'

0 comments on commit 5b5a31e

Please sign in to comment.