Skip to content

Commit

Permalink
Merge pull request #234 from rstudio/centos7-vault
Browse files Browse the repository at this point in the history
Fix CentOS 7 build
  • Loading branch information
glin authored Aug 1, 2024
2 parents e1c52d7 + edaf387 commit bd62e5a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deps:
npm install

docker-build:
@cd builder && docker-compose build --parallel
@cd builder && docker compose build --parallel

AWS_ACCOUNT_ID:=$(shell aws sts get-caller-identity --output text --query 'Account')
AWS_REGION := us-east-1
Expand All @@ -16,13 +16,13 @@ docker-push: ecr-login docker-build
done

docker-down:
@cd builder && docker-compose down
@cd builder && docker compose down

docker-build-r: docker-build
@cd builder && docker-compose up
@cd builder && docker compose up

docker-shell-r-env:
@cd builder && docker-compose run --entrypoint /bin/bash ubuntu-2004
@cd builder && docker compose run --entrypoint /bin/bash ubuntu-2004

ecr-login:
(aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com)
Expand All @@ -41,13 +41,13 @@ serverless-deploy.%: deps fetch-serverless-custom-file

define GEN_TARGETS
docker-build-$(platform):
@cd builder && docker-compose build $(platform)
@cd builder && docker compose build $(platform)

build-r-$(platform):
@cd builder && R_VERSION=$(R_VERSION) docker-compose run --rm $(platform)
@cd builder && R_VERSION=$(R_VERSION) docker compose run --rm $(platform)

test-r-$(platform):
@cd test && R_VERSION=$(R_VERSION) docker-compose run --rm $(platform)
@cd test && R_VERSION=$(R_VERSION) docker compose run --rm $(platform)

bash-$(platform):
docker run -it --rm --entrypoint /bin/bash -v $(CURDIR):/r-builds r-builds:$(platform)
Expand Down
3 changes: 3 additions & 0 deletions builder/Dockerfile.centos-7
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM centos:centos7

ENV OS_IDENTIFIER centos-7

# Use vault.centos.org since CentOS 7 is EOL and the official mirrors are no longer available
RUN sed -i -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*

RUN yum -y update \
&& yum -y install \
autoconf \
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ install_epel () {
${SUDO} yum install ${yes} https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
;;
"7")
${SUDO} yum install ${yes} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
${SUDO} yum install ${yes} https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
;;
"8")
;;
Expand Down
4 changes: 3 additions & 1 deletion test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ services:
- ../:/r-builds
centos-7:
image: centos:centos7
command: /r-builds/test/test-yum.sh
command: |
/bin/bash -c 'sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/* &&
/r-builds/test/test-yum.sh'
environment:
- OS_IDENTIFIER=centos-7
- R_VERSION=${R_VERSION}
Expand Down

0 comments on commit bd62e5a

Please sign in to comment.