github.com/uppal0016/docker_new@v0.0.0-20240123060250-1c98be13ac2c/Dockerfile.gccgo (about)

     1  # This file describes the standard way to build Docker, using docker
     2  #
     3  # Usage:
     4  #
     5  # # Assemble the full dev environment. This is slow the first time.
     6  # docker build -t docker -f Dockerfile.gccgo .
     7  #
     8  
     9  FROM gcc:5.3
    10  
    11  # Packaged dependencies
    12  RUN apt-get update && apt-get install -y \
    13  	apparmor \
    14  	aufs-tools \
    15  	btrfs-tools \
    16  	build-essential \
    17  	curl \
    18  	git \
    19  	iptables \
    20  	jq \
    21  	net-tools \
    22  	libapparmor-dev \
    23  	libcap-dev \
    24  	libsqlite3-dev \
    25  	mercurial \
    26  	net-tools \
    27  	parallel \
    28  	python-dev \
    29  	python-mock \
    30  	python-pip \
    31  	python-websocket \
    32  	--no-install-recommends
    33  
    34  # Get lvm2 source for compiling statically
    35  RUN git clone -b v2_02_103 https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2
    36  # see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags
    37  
    38  # Compile and install lvm2
    39  RUN cd /usr/local/lvm2 \
    40  	&& ./configure --enable-static_link \
    41  	&& make device-mapper \
    42  	&& make install_device-mapper
    43  # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
    44  
    45  # install seccomp: the version shipped in jessie is too old
    46  ENV SECCOMP_VERSION v2.3.0
    47  RUN set -x \
    48      && export SECCOMP_PATH=$(mktemp -d) \
    49      && git clone https://github.com/seccomp/libseccomp.git "$SECCOMP_PATH" \
    50      && ( \
    51          cd "$SECCOMP_PATH" \
    52          && git checkout "$SECCOMP_VERSION" \
    53          && ./autogen.sh \
    54          && ./configure --prefix=/usr \
    55          && make \
    56          && make install \
    57      ) \
    58      && rm -rf "$SECCOMP_PATH"
    59  
    60  ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
    61  
    62  # Get the "docker-py" source so we can run their integration tests
    63  ENV DOCKER_PY_COMMIT e2878cbcc3a7eef99917adc1be252800b0e41ece
    64  RUN git clone https://github.com/docker/docker-py.git /docker-py \
    65  	&& cd /docker-py \
    66  	&& git checkout -q $DOCKER_PY_COMMIT
    67  
    68  # Add an unprivileged user to be used for tests which need it
    69  RUN groupadd -r docker
    70  RUN useradd --create-home --gid docker unprivilegeduser
    71  
    72  VOLUME /var/lib/docker
    73  WORKDIR /go/src/github.com/docker/docker
    74  ENV DOCKER_BUILDTAGS apparmor seccomp selinux
    75  
    76  # Install runc
    77  ENV RUNC_COMMIT e87436998478d222be209707503c27f6f91be0c5
    78  RUN set -x \
    79  	&& export GOPATH="$(mktemp -d)" \
    80  	&& git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
    81  	&& cd "$GOPATH/src/github.com/opencontainers/runc" \
    82  	&& git checkout -q "$RUNC_COMMIT" \
    83  	&& make static BUILDTAGS="seccomp apparmor selinux" \
    84  	&& cp runc /usr/local/bin/docker-runc
    85  
    86  # Install containerd
    87  ENV CONTAINERD_COMMIT 07c95162cdcead88dfe4ca0ffb3cea02375ec54d
    88  RUN set -x \
    89  	&& export GOPATH="$(mktemp -d)" \
    90  	&& git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
    91  	&& cd "$GOPATH/src/github.com/docker/containerd" \
    92  	&& git checkout -q "$CONTAINERD_COMMIT" \
    93  	&& make static \
    94  	&& cp bin/containerd /usr/local/bin/docker-containerd \
    95  	&& cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
    96  	&& cp bin/ctr /usr/local/bin/docker-containerd-ctr
    97  
    98  # Wrap all commands in the "docker-in-docker" script to allow nested containers
    99  ENTRYPOINT ["hack/dind"]
   100  
   101  # Upload docker source
   102  COPY . /go/src/github.com/docker/docker