Skip to content

Commit 085efce

Browse files
authored
Merge pull request #2 from Intellection/builder-phase5h-git-with-lfs
[SRE-5664] Phase 5h: Add Git and Git LFS to builder image
2 parents b17d70d + 95e2369 commit 085efce

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.1.0
4+
5+
* Install `git` and `git-lfs`.
6+
* Set up `builder` user and group with UID and GID of `65533`.
7+
38
## 1.0.0
49

510
* Use Ubuntu 24.04 (LTS) as upstream base image.

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ ARG TARGETARCH
88
RUN apt-get update -y && \
99
apt-get install --no-install-recommends -y \
1010
ca-certificates \
11-
curl && \
11+
curl \
12+
git \
13+
git-lfs && \
1214
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1315

1416
# Docker
@@ -36,8 +38,8 @@ RUN cd /tmp && \
3638

3739
# Create user
3840
ARG APP_USER="builder"
39-
RUN groupadd -g 1001 ${APP_USER} && \
40-
useradd --create-home -u 1001 -g 1001 ${APP_USER}
41+
RUN groupadd -g 65533 ${APP_USER} && \
42+
useradd --create-home -u 65533 -g 65533 ${APP_USER}
4143

4244
WORKDIR /home/${APP_USER}
4345
USER ${APP_USER}:${APP_USER}

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Docker Image Builder
22

3-
A purpose-built image for building and pushing container images via remote [BuildKit](https://github.com/moby/buildkit) daemons. It carries only what is needed for this role — no Docker Engine daemon, no `git`, no build toolchains.
3+
A purpose-built image for building and pushing container images via remote [BuildKit](https://github.com/moby/buildkit) daemons. It carries only what is needed for this role — no Docker Engine daemon and no general build toolchains.
44

55
Published to Docker Hub as [`zappi/image-builder`](https://hub.docker.com/r/zappi/image-builder). Built for `linux/amd64` and `linux/arm64`.
66

@@ -9,11 +9,15 @@ Published to Docker Hub as [`zappi/image-builder`](https://hub.docker.com/r/zapp
99
| Component | Version |
1010
|-----------|---------|
1111
| Base image | Ubuntu 24.04 LTS |
12+
| [Git](https://git-scm.com/) | distro package |
13+
| [Git LFS](https://git-lfs.com/) | distro package |
1214
| [Docker CLI](https://github.com/docker/cli) | 29.3.0 |
1315
| [Docker Buildx plugin](https://github.com/docker/buildx) | 0.31.1 |
1416
| [Amazon ECR Credential Helper](https://github.com/awslabs/amazon-ecr-credential-helper) | 0.12.0 |
1517

16-
The image runs as a non-root `builder` user (UID/GID `1001`).
18+
`git` and `git-lfs` are included as part of the builder toolchain.
19+
20+
The image runs as a non-root `builder` user (UID/GID `65533`).
1721

1822
## Docker CLI Configuration
1923

@@ -42,4 +46,6 @@ Images are tagged and pushed to Docker Hub on every [GitHub Release](https://git
4246

4347
- [docker/cli](https://github.com/docker/cli)
4448
- [docker/buildx](https://github.com/docker/buildx)
49+
- [git/git](https://github.com/git/git)
50+
- [git-lfs/git-lfs](https://github.com/git-lfs/git-lfs)
4551
- [awslabs/amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper)

0 commit comments

Comments
 (0)