Skip to content

Commit 17988d5

Browse files
committed
Update dev containers and upgrade semver
- Upgrade to semver 3.x - Fix VS Code and Gitpod dev containers Signed-off-by: Wade Barnes <wade@neoterictech.ca>
1 parent ff8dc08 commit 17988d5

5 files changed

Lines changed: 55 additions & 71 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
ARG VARIANT="focal"
22
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
33

4-
RUN apt-get update -y \
5-
&& echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list \
6-
&& apt-get install -y --allow-downgrades \
4+
RUN echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list && \
5+
apt-get update -y && apt-get install -y --allow-downgrades \
76
# common stuff
87
git \
98
wget \
@@ -12,7 +11,7 @@ RUN apt-get update -y \
1211
apt-utils \
1312
nano \
1413
software-properties-common \
15-
supervisor \
14+
supervisor \
1615
# Python
1716
python3-pip \
1817
python3-nacl \
@@ -23,50 +22,44 @@ RUN apt-get update -y \
2322
libsnappy-dev \
2423
liblz4-dev \
2524
libbz2-dev \
26-
docker-compose \
27-
&& rm -rf /var/lib/apt/lists/*
28-
29-
# fails when executed in one command with other pip install packages
30-
# RUN pip install python-rocksdb
25+
docker-compose
3126

3227
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
33-
apt-get update && apt-get install -y \
28+
apt-get update -y && apt-get install -y \
3429
libssl1.0.0 \
3530
libssl1.1
3631
# Indy Node and Plenum
3732
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \
3833
&& echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list \
39-
&& apt-get update && apt-get install -y \
34+
&& apt-get update && apt-get install -y \
4035
ursa
4136
# install fpm
42-
ENV FPM_VERSION=1.9.3
43-
RUN apt-get update \
44-
&& apt-add-repository ppa:brightbox/ruby-ng \
45-
&& apt-get install -y --no-install-recommends \
46-
ruby2.6 \
47-
ruby2.6-dev \
48-
&& gem install --no-document rake fpm:$FPM_VERSION \
49-
&& rm -rf /var/lib/apt/lists/*
37+
ENV FPM_VERSION=1.14.2
38+
ENV DOTENV_VERSION=2.8.1
39+
RUN apt-get update -y && apt-get install -y \
40+
ruby \
41+
ruby-dev \
42+
rubygems \
43+
&& gem install --no-document rake dotenv:$DOTENV_VERSION fpm:$FPM_VERSION
5044

5145
# Need to move libursa.so to parent dir
5246
RUN mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa
5347

5448
# Indy SDK
55-
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 || \
56-
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 && \
57-
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
58-
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 \
59-
&& echo "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" >> /etc/apt/sources.list \
60-
&& echo "deb https://repo.sovrin.org/sdk/deb xenial master" >> /etc/apt/sources.list \
61-
&& echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list \
62-
&& echo "deb http://archive.ubuntu.com/ubuntu xenial universe main" >> /etc/apt/sources.list \
63-
&& echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.list \
64-
&& apt-get update -y && apt-get install -y \
49+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
50+
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 \
51+
&& add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev" \
52+
&& add-apt-repository "deb https://repo.sovrin.org/deb xenial master" \
53+
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" \
54+
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" \
55+
&& add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" \
56+
&& apt-get update -y && apt-get install -y \
6557
libindy=1.15.0~1625-bionic \
6658
libsodium23
6759

6860
# pypi based packages
69-
RUN pip3 install -U \
61+
RUN pip3 install -U \
62+
Cython==0.29.36 \
7063
Pygments==2.2.0 \
7164
Pympler==0.8 \
7265
PyNaCl==1.3.0 \
@@ -106,7 +99,7 @@ RUN pip3 install -U \
10699
python3-indy==1.15.0-dev-1625 \
107100
pyzmq==18.1.0 \
108101
rlp==0.6.0 \
109-
semver==2.13.0 \
102+
semver \
110103
setuptools==53.0.0 \
111104
sha3==0.2.1 \
112105
six==1.15.0 \
@@ -118,10 +111,8 @@ RUN pip3 install -U \
118111
wheel==0.34.2 \
119112
zipp==1.2.0 \
120113
mock
121-
# virtualenv \
122-
# python-rocksdb==0.7
123114

124115
RUN mkdir -p /etc/indy && echo "ENABLED_PLUGINS = ['sovtoken', 'sovtokenfees']" > /etc/indy/indy_config.py
125116

126117
RUN apt-get -y autoremove
127-
118+
RUN rm -rf /var/lib/apt/lists/*

.github/workflows/build/Dockerfile.ubuntu-2004

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ RUN pip3 install -U \
105105
python3-indy==1.15.0-dev-1625 \
106106
pyzmq==18.1.0 \
107107
rlp==0.6.0 \
108-
semver==2.13.0 \
108+
semver \
109109
setuptools==53.0.0 \
110110
sha3==0.2.1 \
111111
six==1.15.0 \

.gitpod.Dockerfile

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,30 @@ FROM gitpod/workspace-base as base
22

33
USER gitpod
44

5-
# common stuff
6-
# Python
7-
# rocksdb python wrapper
8-
RUN sudo apt-get update \
9-
&& sudo apt-get install software-properties-common \
10-
&& sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic main" \
11-
&& sudo apt-get install -y \
5+
RUN echo "deb http://security.ubuntu.com/ubuntu bionic main" >> /etc/apt/sources.list && \
6+
apt-get update -y && apt-get install -y --allow-downgrades \
7+
# common stuff
128
git \
139
wget \
1410
apt-transport-https \
1511
ca-certificates \
1612
apt-utils \
1713
nano \
18-
supervisor \
14+
software-properties-common \
15+
supervisor \
16+
# Python
1917
python3-pip \
2018
python3-nacl \
19+
# rocksdb python wrapper
2120
rocksdb-tools \
2221
librocksdb5.17 \
2322
librocksdb-dev \
2423
libsnappy-dev \
2524
liblz4-dev \
2625
libbz2-dev
2726

28-
# fails when executed in one command with other pip install packages
29-
# RUN pip install python-rocksdb
3027
RUN sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu bionic-security main" && \
31-
sudo apt-get update && sudo apt-get install -y \
28+
sudo apt-get update -y && sudo apt-get install -y \
3229
libssl1.0.0 \
3330
libssl1.1
3431

@@ -37,36 +34,34 @@ RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E
3734
sudo add-apt-repository "deb https://repo.sovrin.org/deb bionic master" &&\
3835
sudo apt-get update && sudo apt-get install -y \
3936
ursa
40-
4137
# install fpm
42-
ENV FPM_VERSION=1.9.3
43-
RUN sudo apt-add-repository ppa:brightbox/ruby-ng &&\
44-
sudo apt-get install -y --no-install-recommends \
45-
ruby2.6 \
46-
ruby2.6-dev &&\
47-
sudo gem install --no-document rake fpm:$FPM_VERSION
38+
ENV FPM_VERSION=1.14.2
39+
ENV DOTENV_VERSION=2.8.1
40+
RUN sudo apt-get update -y && sudo apt-get install -y \
41+
ruby \
42+
ruby-dev \
43+
rubygems \
44+
&& gem install --no-document rake dotenv:$DOTENV_VERSION fpm:$FPM_VERSION
4845

4946
# Need to move libursa.so to parent dir
5047
RUN sudo mv /usr/lib/ursa/* /usr/lib && sudo rm -rf /usr/lib/ursa
5148

5249
# Indy SDK
53-
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 || \
54-
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 && \
55-
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 &&\
56-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 &&\
57-
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 &&\
58-
sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" &&\
59-
sudo add-apt-repository "deb https://repo.sovrin.org/deb xenial master" &&\
60-
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" &&\
61-
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" &&\
62-
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" &&\
63-
sudo apt-get update -y && sudo apt-get install -y \
50+
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 && \
51+
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61 && \
52+
sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc" && \
53+
sudo add-apt-repository "deb https://repo.sovrin.org/deb xenial master" && \
54+
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" && \
55+
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic master" && \
56+
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe main" && \
57+
sudo apt-get update -y && sudo apt-get install -y && \
6458
libindy=1.15.0~1625-bionic \
6559
libsodium23
6660

6761
ENV PATH "$PATH:/home/gitpod/.local/bin"
6862
# pypi based packages
6963
RUN pip3 install -U --user\
64+
Cython==0.29.36 \
7065
Pygments==2.2.0 \
7166
Pympler==0.8 \
7267
PyNaCl==1.3.0 \
@@ -106,7 +101,7 @@ RUN pip3 install -U --user\
106101
python3-indy==1.16.0.post286 \
107102
pyzmq==18.1.0 \
108103
rlp==0.6.0 \
109-
semver==2.13.0 \
104+
semver \
110105
setuptools==53.0.0 \
111106
sha3==0.2.1 \
112107
six==1.15.0 \
@@ -118,8 +113,6 @@ RUN pip3 install -U --user\
118113
wheel==0.34.2 \
119114
zipp==1.2.0 \
120115
mock
121-
# virtualenv \
122-
# python-rocksdb==0.7
123116

124117
COPY ./deps .
125118
RUN sudo dpkg -i libsovtoken_1.0.2_amd64.deb

devops/docker/ci/focal/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ RUN pip3 install -U \
107107
python3-indy==1.15.0-dev-1625 \
108108
pyzmq==18.1.0 \
109109
rlp==0.6.0 \
110-
semver==2.13.0 \
110+
semver \
111111
setuptools==53.0.0 \
112112
sha3==0.2.1 \
113113
six==1.15.0 \

updateVersion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def updateWithTag(ver):
15-
if not semver.VersionInfo.isvalid(ver):
15+
if not semver.Version.is_valid(ver):
1616
raise ValueError('No Valid Semver in Tag')
1717
return ver
1818

@@ -21,7 +21,7 @@ def updateWithTimestamp(timestamp):
2121
version = "str"
2222
with open('sovtoken/sovtoken/metadata.json', 'r') as f:
2323
data = json.load(f)
24-
v = semver.VersionInfo.parse(data["version"])
24+
v = semver.Version.parse(data["version"])
2525
v = v.replace(prerelease="dev" + timestamp)
2626
version = str(v)
2727
return version
@@ -32,7 +32,7 @@ def updateWithTimestamp(timestamp):
3232
if args['getVersion']:
3333
with open('sovtoken/sovtoken/metadata.json', 'r') as f:
3434
data = json.load(f)
35-
v = semver.VersionInfo.parse(data["version"])
35+
v = semver.Version.parse(data["version"])
3636
print(v)
3737
quit()
3838

0 commit comments

Comments
 (0)