Skip to content

Commit

Permalink
Move Docker build files (#4180)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Mar 13, 2024
1 parent 64bd8ca commit 346fe7a
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Expand Up @@ -14,4 +14,4 @@
!.gitignore

# additional files for Docker images
!build/docker
!build/ferretdb
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Expand Up @@ -18,7 +18,7 @@ updates:
time: "01:42"

- package-ecosystem: "docker"
directory: "/build/docker"
directory: "/build/ferretdb"
labels: ["deps", "not ready"]
assignees: [AlekSi]
open-pull-requests-limit: 20
Expand Down
22 changes: 11 additions & 11 deletions Taskfile.yml
Expand Up @@ -562,7 +562,7 @@ tasks:
--name=ferretdb
--bootstrap=true
--use=false
--config=./build/docker/buildkitd.toml
--config=./build/buildkitd.toml
--driver=docker-container
--driver-opt network=host
--driver-opt env.JAEGER_TRACE=127.0.0.1:6831
Expand All @@ -586,7 +586,7 @@ tasks:
cmds:
- >
docker buildx build --builder=ferretdb
--file=build/docker/{{.FILE}}.Dockerfile
--file=build/{{.FILE}}.Dockerfile
--build-arg=LABEL_VERSION={{.VERSION}}
--build-arg=LABEL_COMMIT={{.COMMIT}}
--target={{.TARGET}}
Expand Down Expand Up @@ -619,7 +619,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/bin-dev
- task: docker-build
vars:
FILE: development
FILE: ferretdb/development
TARGET: development-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand All @@ -639,7 +639,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/bin
- task: docker-build
vars:
FILE: production
FILE: ferretdb/production
TARGET: production-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand Down Expand Up @@ -669,7 +669,7 @@ tasks:
- echo 'docker-all-in-one' > build/version/package.txt
- task: docker-build
vars:
FILE: all-in-one
FILE: ferretdb/all-in-one
TARGET: all-in-one
PLATFORM: linux/amd64,linux/arm64 # no mongosh for arm/v6 and arm/v7
OUTPUT: type=image,push=true
Expand All @@ -682,7 +682,7 @@ tasks:
- echo 'docker-development' > build/version/package.txt
- task: docker-build
vars:
FILE: development
FILE: ferretdb/development
TARGET: development
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=image,push=true
Expand All @@ -695,7 +695,7 @@ tasks:
- echo 'docker' > build/version/package.txt
- task: docker-build
vars:
FILE: production
FILE: ferretdb/production
TARGET: production
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=image,push=true
Expand Down Expand Up @@ -744,7 +744,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/debs
- task: docker-build
vars:
FILE: development
FILE: ferretdb/development
TARGET: development-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand Down Expand Up @@ -772,7 +772,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/debs
- task: docker-build
vars:
FILE: production
FILE: ferretdb/production
TARGET: production-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand Down Expand Up @@ -812,7 +812,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/rpms
- task: docker-build
vars:
FILE: development
FILE: ferretdb/development
TARGET: development-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand Down Expand Up @@ -840,7 +840,7 @@ tasks:
- bin/envtool{{exeExt}} shell mkdir tmp/rpms
- task: docker-build
vars:
FILE: production
FILE: ferretdb/production
TARGET: production-binary
PLATFORM: linux/amd64,linux/arm64,linux/arm/v7 # TODO https://github.com/FerretDB/FerretDB/issues/3354
OUTPUT: type=local,dest=tmp/build
Expand Down
File renamed without changes.
Expand Up @@ -111,9 +111,9 @@ RUN mkdir /tmp/cover

# all-in-one hacks start there

COPY --from=all-in-one-build /src/build/docker/all-in-one/ferretdb.sh /etc/service/ferretdb/run
COPY --from=all-in-one-build /src/build/docker/all-in-one/postgresql.sh /etc/service/postgresql/run
COPY --from=all-in-one-build /src/build/docker/all-in-one/entrypoint.sh /entrypoint.sh
COPY --from=all-in-one-build /src/build/ferretdb/all-in-one/ferretdb.sh /etc/service/ferretdb/run
COPY --from=all-in-one-build /src/build/ferretdb/all-in-one/postgresql.sh /etc/service/postgresql/run
COPY --from=all-in-one-build /src/build/ferretdb/all-in-one/entrypoint.sh /entrypoint.sh

RUN --mount=type=cache,sharing=locked,target=/var/cache/apt <<EOF
set -ex
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -103,8 +103,8 @@ FROM scratch AS production
COPY --from=production-build /src/bin/ferretdb /ferretdb

# TODO https://github.com/FerretDB/FerretDB/issues/3992
# COPY build/docker/passwd /etc/passwd
# COPY build/docker/group /etc/group
# COPY build/ferretdb/passwd /etc/passwd
# COPY build/ferretdb/group /etc/group
# USER ferretdb:ferretdb

ENTRYPOINT [ "/ferretdb" ]
Expand Down

0 comments on commit 346fe7a

Please sign in to comment.