Skip to content

Commit

Permalink
Update Dockerfiles (ubuntu 20.04) (#296)
Browse files Browse the repository at this point in the history
Dockerfile was outdated, so update it to Ubuntu 20.04 first.
Also, add a few packages that were missing.
  • Loading branch information
dayeol committed Nov 21, 2022
1 parent 1e21deb commit eda71e3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ARG CHECKOUT=master
RUN apt update

Expand All @@ -9,8 +9,9 @@ RUN apt -y install autoconf automake autotools-dev bc \
gperf libgmp-dev libmpc-dev libmpfr-dev libtool texinfo tmux \
patchutils zlib1g-dev wget bzip2 patch vim-common lbzip2 python \
pkg-config libglib2.0-dev libpixman-1-dev libssl-dev screen \
device-tree-compiler expect makeself unzip cpio rsync cmake ninja
device-tree-compiler expect makeself unzip cpio rsync cmake ninja-build p7zip-full

RUN apt-get update && apt-get install --reinstall ca-certificates
RUN git clone https://github.com/keystone-enclave/keystone /keystone
RUN cd /keystone && \
git checkout $CHECKOUT && \
Expand All @@ -19,7 +20,8 @@ RUN cd /keystone && \
. ./source.sh && \
rm -rf firesim-riscv-tools-prebuilt-* && \
rm -f 2.0.tar.gz && \
mkdir -p build && \
rm -f build && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc)
Expand Down
21 changes: 21 additions & 0 deletions docker/Dockerfile.32.nobuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:20.04
ARG CHECKOUT=master
RUN apt update

RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata

RUN apt -y install autoconf automake autotools-dev bc \
bison build-essential curl expat libexpat1-dev flex gawk gcc git \
gperf libgmp-dev libmpc-dev libmpfr-dev libtool texinfo tmux \
patchutils zlib1g-dev wget bzip2 patch vim-common lbzip2 python \
pkg-config libglib2.0-dev libpixman-1-dev libssl-dev screen \
device-tree-compiler expect makeself unzip cpio rsync cmake ninja-build p7zip-full

RUN apt-get update && apt-get install --reinstall ca-certificates
RUN git clone https://github.com/keystone-enclave/keystone /keystone
RUN cd /keystone && \
git checkout $CHECKOUT && \
rmdir linux qemu buildroot && \
BITS=32 ./fast-setup.sh

ENTRYPOINT cd /keystone && . ./source.sh
21 changes: 21 additions & 0 deletions docker/Dockerfile.nobuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:20.04
ARG CHECKOUT=master
RUN apt update

RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata

RUN apt -y install autoconf automake autotools-dev bc \
bison build-essential curl expat libexpat1-dev flex gawk gcc git \
gperf libgmp-dev libmpc-dev libmpfr-dev libtool texinfo tmux \
patchutils zlib1g-dev wget bzip2 patch vim-common lbzip2 python \
pkg-config libglib2.0-dev libpixman-1-dev libssl-dev screen \
device-tree-compiler expect makeself unzip cpio rsync cmake ninja-build p7zip-full

RUN apt-get update && apt-get install --reinstall ca-certificates
RUN git clone https://github.com/keystone-enclave/keystone /keystone
RUN cd /keystone && \
git checkout $CHECKOUT && \
rmdir linux qemu buildroot && \
./fast-setup.sh

ENTRYPOINT cd /keystone && . ./source.sh
18 changes: 17 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

To build the image with master branch:
```bash
docker build -t keystoneenclaveorg/keystone:master
docker build -t keystoneenclaveorg/keystone:master .
```


dev branch:

```bash
Expand All @@ -15,3 +16,18 @@ any other branches or tags:
```bash
docker build -t keystoneenclaveorg/keystone:<tag> --build-arg CHECKOUT=<tag> .
```

# Building CI images

RV64:
```
docker build -t keystoneenclaveorg/keystone:init-rv64gc --build-arg CHECKOUT=master . --platform linux/x86_64 -f Dockerfile.nobuild
docker push keystoneenclaveorg/keystone:init-rv64gc
```

RV32:

```
docker build -t keystoneenclaveorg/keystone:init-rv32gc --build-arg CHECKOUT=master . --platform linux/x86_64 -f Dockerfile.32.nobuild
docker push keystoneenclaveorg/keystone:init-rv32gc
```

0 comments on commit eda71e3

Please sign in to comment.