Skip to content

Commit b556c29

Browse files
authored
Migrate from DockerHub to ACR (#112)
* gh: bump code version * docker: move to acr * docker: change parent image in cpp-sysroot * gha: use credentials for tests * docker: change parent image for faabric-base too
1 parent 12b6487 commit b556c29

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
SYSROOT_VERSION=0.2.3
2-
SYSROOT_CLI_IMAGE=faasm/cpp-sysroot:0.2.3
1+
SYSROOT_VERSION=0.2.4
2+
SYSROOT_CLI_IMAGE=faasm.azurecr.io/cpp-sysroot:0.2.4
33
COMPOSE_PROJECT_NAME=cpp-dev

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ jobs:
2626
- name: "Log in to DockerHub"
2727
uses: docker/login-action@v2
2828
with:
29-
username: ${{ secrets.DOCKER_USERNAME }}
30-
password: ${{ secrets.DOCKER_TOKEN }}
29+
registry: faasm.azurecr.io
30+
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
31+
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
3132
- name: "Build and push cpp-sysroot container"
3233
id: docker_build
3334
uses: docker/build-push-action@v3
3435
with:
3536
push: true
3637
file: docker/cpp-sysroot.dockerfile
3738
context: .
38-
tags: faasm/cpp-sysroot:${{ env.TAG_VERSION }}
39+
tags: faasm.azurecr.io/cpp-sysroot:${{ env.TAG_VERSION }}
3940
build-args: SYSROOT_VERSION=${{ env.TAG_VERSION }}

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
if: github.event.pull_request.draft == false
2020
runs-on: ubuntu-latest
2121
container:
22-
image: faasm/cpp-sysroot:0.2.3
22+
image: faasm.azurecr.io/cpp-sysroot:0.2.4
23+
credentials:
24+
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
25+
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
2326
steps:
2427
# --- Update code ---
2528
- name: "Checkout code"

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.3
1+
0.2.4

docker/cpp-sysroot.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# llvm image is not re-built often, so the tag may be behind
2-
FROM faasm/llvm:0.2.3 as llvm
2+
FROM faasm.azurecr.io/llvm:0.2.4 as llvm
33

44
# faabric-base image is not re-built often, so tag may be behind
5-
FROM faasm/faabric-base:0.4.1
5+
FROM faasm.azurecr.io/faabric-base:0.4.2
66
SHELL ["/bin/bash", "-c"]
77
ENV CPP_DOCKER="on"
88

faasmtools/docker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from subprocess import run
22

3+
ACR_NAME = "faasm.azurecr.io"
4+
35

46
def build_container(
57
tag_name, dockerfile, cwd, nocache=False, push=False, build_args=None
68
):
7-
89
build_args = build_args if build_args else dict()
910

1011
if nocache:

tasks/docker.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
from invoke import task
2-
3-
from os.path import join
4-
51
from faasmtools.docker import (
62
build_container,
73
push_container,
4+
ACR_NAME,
85
)
9-
106
from faasmtools.env import (
117
get_version,
128
PROJ_ROOT,
139
)
10+
from invoke import task
11+
from os.path import join
1412

15-
LLVM_IMAGE_NAME = "faasm/llvm"
13+
LLVM_IMAGE_NAME = "{}/llvm".format(ACR_NAME)
1614
LLVM_DOCKERFILE = join(PROJ_ROOT, "docker", "llvm.dockerfile")
17-
SYSROOT_IMAGE_NAME = "faasm/cpp-sysroot"
15+
SYSROOT_IMAGE_NAME = "{}/cpp-sysroot".format(ACR_NAME)
1816
SYSROOT_DOCKERFILE = join(PROJ_ROOT, "docker", "cpp-sysroot.dockerfile")
1917

2018

0 commit comments

Comments
 (0)