Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 232c4ab

Browse files
committed
Refactor Dockerfile.qa
Optimized so less volatile changes are done first (to take advantage of docker's image caching when possible) and changed the default command to use the Makefile targets for QA test suite.
1 parent 51b43b1 commit 232c4ab

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

Dockerfile.qa

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
FROM golang:1.11
2-
VOLUME /var/lib/openbazaar
32

4-
ENV BITCOIN_VERSION=0.16.3
3+
ENV BITCOIND_VERSION=0.16.3
4+
ENV BITCOIND_PATH=/opt/bitcoin-${BITCOIND_VERSION}
55

6-
WORKDIR /go/src/github.com/OpenBazaar/openbazaar-go
7-
8-
COPY . .
9-
10-
# software installs:
11-
# apt-get installs + compile python 3.6 & protobuf
12-
RUN apt-get -y update
13-
RUN apt-get -y install software-properties-common
14-
RUN apt-get install -yq zlib1g-dev libssl-dev unzip
15-
RUN apt-get install -y python3 python3-pip
16-
17-
RUN python3 -m pip install --upgrade pip && \
18-
pip install -r ./qa/requirements.txt && \
19-
wget https://bitcoin.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-x86_64-linux-gnu.tar.gz && \
20-
tar -xvzf bitcoin-0.16.3-x86_64-linux-gnu.tar.gz -C /opt
6+
# software installs, from most stable to most volatile
7+
RUN apt-get update -y
8+
RUN apt-get install -yq software-properties-common \
9+
zlib1g-dev \
10+
libssl-dev \
11+
unzip \
12+
python3 \
13+
python3-pip
2114

2215
RUN wget https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip && \
2316
unzip ./protoc-3.6.0-linux-x86_64.zip -x readme.txt && \
@@ -37,8 +30,15 @@ RUN git checkout tags/v1.2.0 -b v1.2.0 && \
3730
cd protoc-gen-go && \
3831
go install
3932

40-
# build current version of OpenBazaar
33+
COPY ./qa/requirements.txt ./requirements.txt
34+
35+
RUN python3 -m pip install --upgrade pip && \
36+
pip install -r ./requirements.txt && \
37+
wget https://bitcoin.org/bin/bitcoin-core-0.16.3/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz && \
38+
tar -xvzf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz -C /opt
39+
4140
WORKDIR /go/src/github.com/OpenBazaar/openbazaar-go
42-
# RUN go build -o /opt/openbazaard .
41+
COPY ./Makefile ./Makefile
42+
VOLUME /go/src/github.com/OpenBazaar/openbazaar-go
4343

44-
ENTRYPOINT ["/go/src/github.com/OpenBazaar/openbazaar-go/build_qa.sh"]
44+
CMD make qa

build_qa.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)