Use docker mirror

This commit is contained in:
Michele 2020-10-29 11:05:41 -07:00
parent 69312458c4
commit 54786d8c2e
4 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ version: 2.1
executors: executors:
golang: golang:
docker: docker:
- image: circleci/golang:1.15 - image: docker.mirror.hashicorp.services/circleci/golang:1.15
resource_class: medium+ resource_class: medium+
darwin: darwin:
macos: macos:
@ -153,7 +153,7 @@ jobs:
destination: / destination: /
build-website-docker-image: build-website-docker-image:
docker: docker:
- image: circleci/buildpack-deps - image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c shell: /usr/bin/env bash -euo pipefail -c
steps: steps:
- checkout - checkout
@ -167,14 +167,14 @@ jobs:
echo "Dependencies have not changed, not building a new website docker image." echo "Dependencies have not changed, not building a new website docker image."
else else
cd website/ cd website/
docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS
docker build -t hashicorp/packer-website:$IMAGE_TAG . docker build -t hashicorp/packer-website:$IMAGE_TAG .
docker tag hashicorp/packer-website:$IMAGE_TAG hashicorp/packer-website:latest docker tag hashicorp/packer-website:$IMAGE_TAG hashicorp/packer-website:latest
docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS
docker push hashicorp/packer-website docker push hashicorp/packer-website
fi fi
algolia-index: algolia-index:
docker: docker:
- image: node:12 - image: docker.mirror.hashicorp.services/node:12
steps: steps:
- checkout - checkout
- run: - run:

View File

@ -1,4 +1,4 @@
FROM ubuntu:16.04 FROM docker.mirror.hashicorp.services/ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive

View File

@ -1,4 +1,4 @@
FROM node:10.16.3-alpine FROM docker.mirror.hashicorp.services/node:10.16.3-alpine
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev
COPY ./package.json /website/package.json COPY ./package.json /website/package.json

View File

@ -1,7 +1,7 @@
# Default: run this if working on the website locally to run in watch mode. # Default: run this if working on the website locally to run in watch mode.
website: website:
@echo "==> Downloading latest Docker image..." @echo "==> Downloading latest Docker image..."
@docker pull hashicorp/packer-website @docker pull docker.mirror.hashicorp.services/hashicorp/packer-website
@echo "==> Starting website in Docker..." @echo "==> Starting website in Docker..."
@docker run \ @docker run \
--interactive \ --interactive \
@ -17,7 +17,7 @@ website:
# This command will generate a static version of the website to the "out" folder. # This command will generate a static version of the website to the "out" folder.
build: build:
@echo "==> Downloading latest Docker image..." @echo "==> Downloading latest Docker image..."
@docker pull hashicorp/packer-website @docker pull docker.mirror.hashicorp.services/hashicorp/packer-website
@echo "==> Starting build in Docker..." @echo "==> Starting build in Docker..."
@docker run \ @docker run \
--interactive \ --interactive \
@ -26,7 +26,7 @@ build:
--workdir "/website" \ --workdir "/website" \
--volume "$(shell pwd):/website" \ --volume "$(shell pwd):/website" \
--volume "/website/node_modules" \ --volume "/website/node_modules" \
hashicorp/packer-website \ docker.mirror.hashicorp.services/hashicorp/packer-website \
npm run static npm run static
# If you are changing node dependencies locally, run this to generate a new # If you are changing node dependencies locally, run this to generate a new