-
Notifications
You must be signed in to change notification settings - Fork 989
Closed
Labels
CodeBuild-localTag to track issues and PRs for CodeBuild local Docker imageTag to track issues and PRs for CodeBuild local Docker imagebug
Description
I found that when I use a custom Docker image as the build environment:
FROM ubuntu:18.04
ENV GOLANG_VERSION="1.12.5"
RUN set -ex \
&& apt-get update \
&& apt-get install software-properties-common -y --no-install-recommends \
&& apt-add-repository ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
wget ca-certificates git=1:2.* \
&& git version \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
ENV GOLANG_DOWNLOAD_SHA256="aea86e3c73495f205929cfebba0d63f1382c8ac59be081b6351681415f4063cf" \
GOPATH="/go" \
DEP_VERSION="0.5.1" \
DEP_BINARY="dep-linux-amd64"
RUN set -ex \
&& mkdir -p "$GOPATH/src" "$GOPATH/bin" \
&& chmod -R 777 "$GOPATH" \
&& apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
&& apt-get clean \
&& wget "https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz" -O /tmp/golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 /tmp/golang.tar.gz" | sha256sum -c - \
&& tar -xzf /tmp/golang.tar.gz -C /usr/local \
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& wget "https://github.com/golang/dep/releases/download/v$DEP_VERSION/$DEP_BINARY" -O "$GOPATH/bin/dep" \
&& chmod +x "$GOPATH/bin/dep"
ENV PATH="$GOPATH/bin:/usr/local/go/bin:$PATH"
# DO NOT PROVIDE AN ENTRYPOINT! Otherwise Codebuild local would not actually run the buildspec.yml
# ENTRYPOINT ["/bin/bash", "-c"]
when I specified ENTRYPOINT
, running codebuild_build.sh
seems to always succeed (return exit code 0) and does not actually execute build specified in buildspec.yml. After removing ENTRYPOINT
, it started to actually run the buildspec.
Metadata
Metadata
Assignees
Labels
CodeBuild-localTag to track issues and PRs for CodeBuild local Docker imageTag to track issues and PRs for CodeBuild local Docker imagebug