Skip to content

Commit

Permalink
fix(tools): fabric all-in-one build cannot find rust compiler #617
Browse files Browse the repository at this point in the history
Fixes #617

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Mar 5, 2021
1 parent 5623369 commit 630537f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
9 changes: 7 additions & 2 deletions tools/docker/fabric-all-in-one/Dockerfile_v1.4.x
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# We need to use the older, more stable v18 here because of
# https://github.com/docker-library/docker/issues/170
FROM docker:18.09.9-dind
FROM docker:20.10.3-dind

ARG FABRIC_VERSION=1.4.8
ARG CA_VERSION=1.4.9
Expand All @@ -18,7 +18,12 @@ RUN apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
RUN pip3 install --no-cache --upgrade "pip>=21" setuptools

# Without this the docker-compose installation crashes, complaining about
# a lack of rust compiler...
# RUN pip install setuptools_rust
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1

# Install Docker Compose which is a dependency of Fabric Samples
RUN pip install docker-compose
Expand Down
9 changes: 7 additions & 2 deletions tools/docker/fabric-all-in-one/Dockerfile_v2.x
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# We need to use the older, more stable v18 here because of
# https://github.com/docker-library/docker/issues/170
FROM docker:18.09.9-dind
FROM docker:20.10.3-dind

ARG FABRIC_VERSION=2.2.0
ARG CA_VERSION=1.4.9
Expand All @@ -18,7 +18,12 @@ RUN apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
RUN pip3 install --no-cache --upgrade "pip>=21" setuptools

# Without this the docker-compose installation crashes, complaining about
# a lack of rust compiler...
# RUN pip install setuptools_rust
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1

# Install Docker Compose which is a dependency of Fabric Samples
RUN pip install docker-compose
Expand Down
18 changes: 17 additions & 1 deletion tools/docker/fabric-all-in-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
An all in one fabric docker image with 1 peer, 1 orderer and 1 channel.

## Usage

### Visual Studio Code

Example `.vscode/tasks.json` file for building/running the image:

```json
Expand Down Expand Up @@ -35,7 +39,19 @@ Example `.vscode/tasks.json` file for building/running the image:
}
```

## Running Fabric CLI Container Commands
### Local Image Builds

From the project root:

```sh
docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v2.x -t faio2x
```

```sh
docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v1.4.x -t faio14x
```

### Running Fabric CLI Container Commands

For Fabric 1.4.x

Expand Down

0 comments on commit 630537f

Please sign in to comment.