Skip to content

Commit d75ca8a

Browse files
authored
docs: address docs builds and memcached customization to docker file (#548)
1 parent d770f69 commit d75ca8a

File tree

2 files changed

+70
-52
lines changed

2 files changed

+70
-52
lines changed

packages/google-cloud-ndb/.kokoro/docker/docs/Dockerfile

Lines changed: 55 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,41 @@ ENV DEBIAN_FRONTEND noninteractive
2020
ENV PATH /usr/local/bin:$PATH
2121

2222
# Install dependencies.
23+
# Spell check related
24+
RUN apt-get update && apt-get install -y dictionaries-common aspell aspell-en \
25+
hunspell-en-us libenchant1c2a enchant
2326
RUN apt-get update \
2427
&& apt-get install -y --no-install-recommends \
25-
apt-transport-https \
26-
build-essential \
27-
ca-certificates \
28-
curl \
29-
dirmngr \
30-
git \
31-
gpg-agent \
32-
graphviz \
33-
libbz2-dev \
34-
libdb5.3-dev \
35-
libexpat1-dev \
36-
libffi-dev \
37-
liblzma-dev \
38-
libreadline-dev \
39-
libsnappy-dev \
40-
libssl-dev \
41-
libsqlite3-dev \
42-
memcached \
43-
portaudio19-dev \
44-
redis-server \
45-
software-properties-common \
46-
ssh \
47-
sudo \
48-
tcl \
49-
tcl-dev \
50-
tk \
51-
tk-dev \
52-
uuid-dev \
53-
wget \
54-
zlib1g-dev \
28+
apt-transport-https \
29+
build-essential \
30+
ca-certificates \
31+
curl \
32+
dirmngr \
33+
git \
34+
gpg-agent \
35+
graphviz \
36+
libbz2-dev \
37+
libdb5.3-dev \
38+
libexpat1-dev \
39+
libffi-dev \
40+
liblzma-dev \
41+
libreadline-dev \
42+
libsnappy-dev \
43+
libssl-dev \
44+
libsqlite3-dev \
45+
memcached \
46+
portaudio19-dev \
47+
redis-server \
48+
software-properties-common \
49+
ssh \
50+
sudo \
51+
tcl \
52+
tcl-dev \
53+
tk \
54+
tk-dev \
55+
uuid-dev \
56+
wget \
57+
zlib1g-dev \
5558
&& add-apt-repository universe \
5659
&& apt-get update \
5760
&& apt-get -y install jq \
@@ -64,28 +67,28 @@ RUN apt-get update \
6467
COPY fetch_gpg_keys.sh /tmp
6568
# Install the desired versions of Python.
6669
RUN set -ex \
67-
&& export GNUPGHOME="$(mktemp -d)" \
68-
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
69-
&& /tmp/fetch_gpg_keys.sh \
70-
&& for PYTHON_VERSION in 3.7.8 3.8.5; do \
71-
wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
72-
&& wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
73-
&& gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
74-
&& rm -r python-${PYTHON_VERSION}.tar.xz.asc \
75-
&& mkdir -p /usr/src/python-${PYTHON_VERSION} \
76-
&& tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
77-
&& rm python-${PYTHON_VERSION}.tar.xz \
78-
&& cd /usr/src/python-${PYTHON_VERSION} \
79-
&& ./configure \
80-
--enable-shared \
81-
# This works only on Python 2.7 and throws a warning on every other
82-
# version, but seems otherwise harmless.
83-
--enable-unicode=ucs4 \
84-
--with-system-ffi \
85-
--without-ensurepip \
86-
&& make -j$(nproc) \
87-
&& make install \
88-
&& ldconfig \
70+
&& export GNUPGHOME="$(mktemp -d)" \
71+
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
72+
&& /tmp/fetch_gpg_keys.sh \
73+
&& for PYTHON_VERSION in 3.7.8 3.8.5; do \
74+
wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
75+
&& wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
76+
&& gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
77+
&& rm -r python-${PYTHON_VERSION}.tar.xz.asc \
78+
&& mkdir -p /usr/src/python-${PYTHON_VERSION} \
79+
&& tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
80+
&& rm python-${PYTHON_VERSION}.tar.xz \
81+
&& cd /usr/src/python-${PYTHON_VERSION} \
82+
&& ./configure \
83+
--enable-shared \
84+
# This works only on Python 2.7 and throws a warning on every other
85+
# version, but seems otherwise harmless.
86+
--enable-unicode=ucs4 \
87+
--with-system-ffi \
88+
--without-ensurepip \
89+
&& make -j$(nproc) \
90+
&& make install \
91+
&& ldconfig \
8992
; done \
9093
&& rm -rf "${GNUPGHOME}" \
9194
&& rm -rf /usr/src/python* \

packages/google-cloud-ndb/synth.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,19 @@
3434
gcloud --quiet --verbosity=debug datastore indexes create tests/system/index.yaml
3535
""")
3636

37+
s.replace(
38+
".kokoro/docker/docs/Dockerfile",
39+
"libsqlite3-dev.*\n",
40+
"\g<0> memcached \\\n"\
41+
)
42+
43+
s.replace(
44+
".kokoro/docker/docs/Dockerfile",
45+
"# Install dependencies.\n",
46+
"""\g<0># Spell check related
47+
RUN apt-get update && apt-get install -y dictionaries-common aspell aspell-en \\
48+
hunspell-en-us libenchant1c2a enchant
49+
"""
50+
)
51+
3752
s.shell.run(["nox", "-s", "blacken"], hide_output=False)

0 commit comments

Comments
 (0)