#6045 add Ubuntu 22.04 Dockerfile

This commit is contained in:
khalyomede 2023-11-21 18:46:23 +01:00
parent 08ee6ed018
commit ebaf822435
3 changed files with 48 additions and 0 deletions

24
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,24 @@
on:
pull_request:
name: Docker images tests
jobs:
ubuntu-2204-nightly:
name: ubuntu-2204-nightly
runs-on: [ubuntu-20.04]
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- name: Copy example docker file
run: cp docker/ubuntu-2204-nightly/docker-compose.example.yml docker/ubuntu-2204-nightly/docker-compose.yml
- name: Build image
run: docker-compose -f docker/ubuntu-2204-nightly/docker-compose.yml build
- name: Run hello world test
run: docker-compose -f docker/ubuntu-2204-nightly/docker-compose.yml run roc examples/helloWorld.roc
- name: Run C platform test
run: docker-compose -f docker/ubuntu-2204-nightly/docker-compose.yml run roc examples/platform-switching/rocLovesC.roc

View file

@ -0,0 +1,16 @@
FROM ubuntu:22.04
RUN apt-get update --fix-missing
RUN apt-get upgrade --yes
RUN apt-get install --yes \
wget \
libc-dev \
binutils \
build-essential \
clang
RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
RUN mkdir /usr/lib/roc
# --strip-components=1 not needed once https://github.com/roc-lang/roc/issues/4118 is solved.
RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1
ENV PATH="$PATH:/usr/lib/roc"

View file

@ -0,0 +1,8 @@
version: "3"
services:
roc:
build: .
entrypoint: roc
working_dir: /home/ubuntu/app
volumes:
- ../../:/home/ubuntu/app