...

Text file src/go.mongodb.org/mongo-driver/Dockerfile

Documentation: go.mongodb.org/mongo-driver

     1# Dockerfile for Go Driver local development.
     2
     3# Build libmongocrypt in a separate build stage.
     4FROM ubuntu:20.04 as libmongocrypt
     5
     6RUN apt-get -qq update && \
     7  apt-get -qqy install --no-install-recommends \
     8    git \
     9    ca-certificates \
    10    curl \
    11    build-essential \
    12    libssl-dev \
    13    python
    14
    15COPY etc/install-libmongocrypt.sh /root/install-libmongocrypt.sh
    16RUN cd /root && bash ./install-libmongocrypt.sh
    17
    18
    19# Copy in the files from the libmongocrypt build stage.
    20FROM ubuntu:20.04
    21
    22# Install common deps.
    23RUN export DEBIAN_FRONTEND=noninteractive && \
    24  export TZ=Etc/UTC && \
    25  apt-get -qq update && \
    26  apt-get -qqy install --reinstall --no-install-recommends \
    27    git \
    28    ca-certificates \
    29    curl \
    30    wget \
    31    sudo \
    32    tzdata \
    33    ca-certificates \
    34    pkg-config \
    35    software-properties-common \
    36    gpg \
    37    apt-utils \
    38    libc6-dev \
    39    gcc \
    40    make && \
    41  sudo update-ca-certificates && \
    42  rm -rf /var/lib/apt/lists/*
    43
    44# Install golang from the golang-backports ppa.
    45RUN export DEBIAN_FRONTEND=noninteractive && \
    46  export TZ=Etc/UTC && \
    47  export LC_ALL=C.UTF-8 && \
    48  sudo -E apt-add-repository "ppa:longsleep/golang-backports" && \
    49  apt-get -qq update --option Acquire::Retries=100 --option Acquire::http::Timeout="60" && \
    50  apt-get -qqy install --option Acquire::Retries=100 --option Acquire::http::Timeout="60" --no-install-recommends golang-go && \
    51  rm -rf /var/lib/apt/lists/*
    52
    53COPY ./etc/docker_entry.sh /root/docker_entry.sh
    54
    55COPY --from=libmongocrypt /root/install /root/install
    56
    57ENV DOCKER_RUNNING=true
    58
    59ENTRYPOINT ["/bin/bash", "/root/docker_entry.sh"]

View as plain text