Skip to content

Commit

Permalink
Update docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbosco committed Mar 5, 2021
1 parent a5880fd commit e3724ea
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions cli/scripts/publish_docker_scraper_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
tag=$(git describe --abbrev=0 --tags)
read -r -p "Do you wish to also deploy $tag?" yn
case $yn in
[Yy]* ) ./docsearch docker:build local_tag && docker push algolia/docsearch-scraper-base:"$tag" && docker push docsearch-scraper:"$tag";;
[Yy]* ) ./docsearch docker:build local_tag && docker push typesense/docsearch-scraper-base:"$tag" && docker push docsearch-scraper:"$tag";;
[Nn]* ) ./docsearch docker:build;;
* ) echo "Please answer yes or no, aborting."; exit 1;;
esac

docker push algolia/docsearch-scraper-base
docker push algolia/docsearch-scraper
docker push typesense/docsearch-scraper-base
docker push typesense/docsearch-scraper
2 changes: 1 addition & 1 deletion cli/src/commands/abstract_build_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class AbstractBuildDocker(AbstractCommand):
@staticmethod
def build_docker_file(file, image="algolia/docsearch-scraper-dev",
def build_docker_file(file, image="typesense/docsearch-scraper-dev",
local_tag=False):
tags = [image]

Expand Down
6 changes: 3 additions & 3 deletions cli/src/commands/build_docker_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def run(self, args):

if test:
return self.build_docker_file("scraper/dev/docker/Dockerfile.test",
"algolia/docsearch-scraper-test",
"typesense/docsearch-scraper-test",
local_tag=local_tag)

code = self.build_docker_file("scraper/dev/docker/Dockerfile.base",
"algolia/docsearch-scraper-base",
"typesense/docsearch-scraper-base",
local_tag=local_tag)

if code != 0:
Expand All @@ -38,4 +38,4 @@ def run(self, args):
if code != 0:
return code
return self.build_docker_file("scraper/dev/docker/Dockerfile",
"algolia/docsearch-scraper", local_tag=local_tag)
"typesense/docsearch-scraper", local_tag=local_tag)
4 changes: 2 additions & 2 deletions cli/src/commands/run_config_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def run(self, args):

if from_local_code:
container_name = "docsearch-scraper-dev"
image_name = "algolia/docsearch-scraper-dev"
image_name = "typesense/docsearch-scraper-dev"
else:
container_name = "docsearch-scraper"
image_name = "algolia/docsearch-scraper"
image_name = "typesense/docsearch-scraper"

run_command = [
"docker",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def run(self, args):
"--name",
"docsearch-scraper-test",
"-t",
"algolia/docsearch-scraper-test"]
"typesense/docsearch-scraper-test"]
return self.exec_shell_command(run_command)
test_command = ["pytest", "./scraper/src"]

Expand Down
4 changes: 2 additions & 2 deletions scraper/dev/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM algolia/docsearch-scraper-base
LABEL maintainer="[email protected]"
FROM typesense/docsearch-scraper-base
LABEL maintainer="[email protected]"

WORKDIR /root
COPY scraper/src ./src
Expand Down
4 changes: 2 additions & 2 deletions scraper/dev/docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
LABEL maintainer="[email protected]"

WORKDIR /root

Expand Down Expand Up @@ -34,7 +34,7 @@ RUN apt-get update -y && apt-get install -yq \
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update -y && apt-get install -yq \
google-chrome-stable=85.0.4183.102-1 \
google-chrome-stable \
unzip
RUN wget -q https://chromedriver.storage.googleapis.com/85.0.4183.83/chromedriver_linux64.zip
RUN unzip chromedriver_linux64.zip
Expand Down
4 changes: 2 additions & 2 deletions scraper/dev/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# - Do not COPY ./src
# - Do not define an ENTRYPOINT

FROM algolia/docsearch-scraper-base
LABEL maintainer="[email protected]"
FROM typesense/docsearch-scraper-base
LABEL maintainer="[email protected]"
4 changes: 2 additions & 2 deletions scraper/dev/docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM algolia/docsearch-scraper-base
LABEL maintainer="[email protected]"
FROM typesense/docsearch-scraper-base
LABEL maintainer="[email protected]"

WORKDIR /root

Expand Down

0 comments on commit e3724ea

Please sign in to comment.