Skip to content

Commit

Permalink
Merge pull request #34 from jn9e9/feature/iss-33-docker-image
Browse files Browse the repository at this point in the history
Issue #33 docker image fix
  • Loading branch information
ionut-arm authored Mar 21, 2021
2 parents 1a7cd24 + 94680a1 commit e5d70ac
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 333 deletions.
68 changes: 3 additions & 65 deletions e2etest/provider_cfg/all/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,79 +1,17 @@
# Copyright 2021 Contributors to the Parsec project.
# SPDX-License-Identifier: Apache-2.0

FROM ghcr.io/tpm2-software/ubuntu-18.04:latest

ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig

RUN apt-get update && \
apt-get install -y git make gcc python3 python curl wget cmake && \
apt-get install -y automake autoconf libtool pkg-config libssl-dev libgcc1 && \
# These libraries are needed for bindgen as it uses libclang.so
apt-get install -y clang libclang-dev libc6-dev-i386

WORKDIR /tmp
RUN wget https://github.com/ARMmbed/mbed-crypto/archive/mbedcrypto-2.0.0.tar.gz
RUN tar xf mbedcrypto-2.0.0.tar.gz
RUN cd mbed-crypto-mbedcrypto-2.0.0 \
&& make SHARED=0

WORKDIR /tmp
# Download and install SoftHSM2
RUN git clone https://github.com/opendnssec/SoftHSMv2.git \
&& cd SoftHSMv2 \
&& git reset --hard 20a53bd083a6134ce2230f80edda5dc8be0366bd

RUN cd SoftHSMv2 \
&& sh autogen.sh \
# Autogen might fail because of some limitations of autoconf, see:
# https://bugzilla.redhat.com/show_bug.cgi?id=1826935#c3
|| sh autogen.sh
RUN cd SoftHSMv2 \
&& ./configure --disable-gost \
&& make \
&& make install

# Download and install TSS 2.0
RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch 2.3.3
RUN cd tpm2-tss \
&& ./bootstrap \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& ldconfig

# Download and install TPM2 tools
RUN git clone https://github.com/tpm2-software/tpm2-tools.git --branch 4.1
RUN cd tpm2-tools \
&& ./bootstrap \
&& ./configure --enable-unit \
&& make install

# Create a new token in a new slot. The slot number assigned will be random
# and is found with the find_slot_number script.
RUN softhsm2-util --init-token --slot 0 --label "Parsec Tests" --pin 123456 --so-pin 123456

# Add users for multitenancy tests
RUN useradd -m parsec-client-1
RUN useradd -m parsec-client-2

USER parsec-client-1
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

USER parsec-client-2
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
FROM ghcr.io/parallaxsecond/parsec-service-test-all

# Install Rust toolchain for root
USER root
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Download the SPIRE server and agent
RUN curl -s -N -L https://github.com/spiffe/spire/releases/download/v0.11.1/spire-0.11.1-linux-x86_64-glibc.tar.gz | tar xz

# Install go 15
# Install go 1.16

RUN curl -s -N -L https://golang.org/dl/go1.15.7.linux-amd64.tar.gz | tar xz -C /usr/local
RUN curl -s -N -L https://golang.org/dl/go1.16.linux-amd64.tar.gz | tar xz -C /usr/local
ENV PATH="/usr/local/go/bin:${PATH}"

RUN git clone https://github.com/parallaxsecond/parsec
Expand Down
29 changes: 0 additions & 29 deletions e2etest/provider_cfg/mbed-crypto/Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions e2etest/provider_cfg/mbed-crypto/config.toml

This file was deleted.

48 changes: 0 additions & 48 deletions e2etest/provider_cfg/pkcs11/Dockerfile

This file was deleted.

35 changes: 0 additions & 35 deletions e2etest/provider_cfg/pkcs11/config.toml

This file was deleted.

41 changes: 0 additions & 41 deletions e2etest/provider_cfg/tpm/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions e2etest/provider_cfg/tpm/config.toml

This file was deleted.

17 changes: 0 additions & 17 deletions e2etest/scripts/ci-mbed-crypto.sh

This file was deleted.

17 changes: 0 additions & 17 deletions e2etest/scripts/ci-pkcs11.sh

This file was deleted.

17 changes: 0 additions & 17 deletions e2etest/scripts/ci-tpm.sh

This file was deleted.

4 changes: 2 additions & 2 deletions e2etest/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ if [ "$PROVIDER_NAME" = "tpm" ] || [ "$PROVIDER_NAME" = "all" ]; then
tpm_server &
TPM_SRV_PID=$!
sleep 5
tpm2_startup -c -T mssim
tpm2_changeauth -c owner tpm_pass
tpm2_startup -c 2>/dev/null
tpm2_takeownership -o tpm_pass 2>/dev/null
# tpm2_startup -c -T mssim 2>/dev/null
# tpm2_changeauth -c owner tpm_pass 2>/dev/null
fi
Expand Down

0 comments on commit e5d70ac

Please sign in to comment.