Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: EasyCrypt Docker Containers Build and Publish

on:
push:
branches:
- 'main'
- 'latest'
tags:
- 'r[0-9]+.[0-9]+'
workflow_dispatch:

jobs:
make-image:
name: Make and Publish Container Images
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
target: [base, build, test]
steps:
- uses: actions/checkout@v4
- name: Install docker and docker-buildx
run: apt install docker docker-buildx
- name: Build ${{ matrix.target }} Image
run: TAG=${{ github.ref_name }} VARIANT=${{ matrix.target }} make -C scripts/docker publish

4 changes: 2 additions & 2 deletions scripts/docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

FROM debian:stable

MAINTAINER Pierre-Yves Strub <[email protected]>
LABEL org.opencontainers.image.maintainer="Pierre-Yves Strub <[email protected]>"

ARG user=charlie

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN \
apt-get -q -y update && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM ./Dockerfile.build
ARG EC_VERSION=main

RUN \
opam pin --dev-repo \
opam pin \
add -n easycrypt https://github.com/EasyCrypt/easycrypt.git#${EC_VERSION} && \
opam install -v easycrypt && \
rm -rf .opam/packages.dev/*
7 changes: 4 additions & 3 deletions scripts/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# --------------------------------------------------------------------
VARIANT ?= build
TAG ?= main

# --------------------------------------------------------------------
.PHONY: default build publish
Expand All @@ -10,9 +11,9 @@ default: build

build:
docker build -f Dockerfile.$(VARIANT) \
--platform linux/amd64 \
-t ghcr.io/easycrypt/ec-$(VARIANT)-box \
--platform linux/amd64 \
-t ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG) \
.

publish:
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box
docker push ghcr.io/easycrypt/ec-$(VARIANT)-box:$(TAG)