-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.release
77 lines (64 loc) · 2.42 KB
/
Dockerfile.release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM ruby:2.7.4-alpine3.13
LABEL maintainer="Ryan Schlesinger <[email protected]>"
RUN addgroup -S -g 1000 shipitron && \
adduser -S -u 1000 -G shipitron shipitron && \
addgroup -g 1101 docker && \
addgroup shipitron docker
RUN apk add --no-cache \
ca-certificates \
openssl-dev \
tini \
su-exec \
build-base \
git \
openssh-client \
perl \
bash \
curl \
wget \
jq \
cmake
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV ECR_CREDENTIAL_HELPER_VERSION 0.6.0
RUN cd /usr/local/bin && \
wget https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/${ECR_CREDENTIAL_HELPER_VERSION}/linux-amd64/docker-credential-ecr-login && \
chmod +x docker-credential-ecr-login
ENV BUILDKIT_VERSION v0.10.4
RUN cd /usr/local/bin && \
wget -nv https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz && \
tar --strip-components=1 -zxvf buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz bin/buildctl && \
chmod +x buildctl && \
rm -f buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz
ENV GIT_LFS_VERSION 3.2.0
ENV GIT_LFS_HASH d6730b8036d9d99f872752489a331995930fec17b61c87c7af1945c65a482a50
RUN set -eux; \
\
mkdir -p /tmp/build; \
cd /tmp/build; \
\
curl -sSL -o git-lfs.tgz https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-amd64-v${GIT_LFS_VERSION}.tar.gz; \
echo "${GIT_LFS_HASH} git-lfs.tgz" | sha256sum -c -; \
tar -xzf git-lfs.tgz --strip-components=1; \
cp git-lfs /usr/local/bin/; \
\
cd; \
rm -rf /tmp/build; \
\
git lfs install --system
USER shipitron
ENV BUILDX_VERSION v0.9.1
RUN cd /home/shipitron && \
wget -nv https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-amd64 && \
mkdir -p ~/.docker/cli-plugins && \
mv buildx-${BUILDX_VERSION}.linux-amd64 ~/.docker/cli-plugins/docker-buildx && \
chmod a+x ~/.docker/cli-plugins/docker-buildx
USER root
WORKDIR /app
ENV SHIPITRON_VERSION=1.4.1
RUN gem install shipitron -v ${SHIPITRON_VERSION} && \
mkdir -p /home/shipitron/.ssh && \
chown shipitron:shipitron /home/shipitron/.ssh && \
chmod 700 /home/shipitron/.ssh
COPY scripts/release-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
CMD ["help"]