Page MenuHomePhabricator

Create root .dockerignore file
ClosedPublic

Authored by ashoat on Apr 11 2022, 4:47 PM.
Tags
None
Referenced Files
F3377850: D3710.id11350.diff
Wed, Nov 27, 7:49 AM
F3377485: D3710.diff
Wed, Nov 27, 5:56 AM
Unknown Object (File)
Sat, Nov 23, 7:04 AM
Unknown Object (File)
Sat, Nov 16, 9:31 PM
Unknown Object (File)
Fri, Nov 15, 9:05 AM
Unknown Object (File)
Fri, Nov 15, 9:05 AM
Unknown Object (File)
Thu, Nov 14, 4:37 PM
Unknown Object (File)
Thu, Nov 14, 4:37 PM

Details

Summary

I'm Dockerizing the Node.js keyserver, which requires including files from various Yarn Workspaces. As a result I'm creating a .dockerignore in the root folder, and I figured it would make sure to merge all the .dockerignores into one. (Open to other approaches if people disagree.)

Test Plan

Make sure I can build the Node.js keyserver from Docker. Also CI

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 11 2022, 4:48 PM
Harbormaster failed remote builds in B8103: Diff 11330!

Remove services/tunnelbroker/docker from .dockerignore

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 12 2022, 8:07 AM
Harbormaster failed remote builds in B8121: Diff 11349!
.dockerignore
10 ↗(On Diff #11349)

Need the .flowconfig files so native's postinstall hook doesn't crash when it calls yarn flow-mono create-symlinks native

11–12 ↗(On Diff #11349)

Need these so native's postinstall hook doesn't crash when it calls yarn patch-package or npx pod-patch

16 ↗(On Diff #11349)

Later on I'll need to add keyserver/facts and keyserver/secrets to this. We should not be copying in the files from my private dev environment into the Docker images we publish. For now I'm leaving them in to make testing easier

20 ↗(On Diff #11349)

I copied this over from the old services/identity/.dockerignore, but this file doesn't appear to exist. @varun, are you planning on adding it later?

services/identity/.dockerignore
4 ↗(On Diff #11349)

I deleted this line (rather, didn't move it over) because I'm pretty sure the .git folder only exists in the root of the repository. @varun, am I missing something?

services/tunnelbroker/.dockerignore
1 ↗(On Diff #11349)

I deleted this line (rather, didn't move it over) following discussion in the Services Team chat on Comm

Include native/cpp/CommonCpp/grpc/protos/

.dockerignore
10 ↗(On Diff #11350)

Need the .flowconfig files so native's postinstall hook doesn't crash when it calls yarn flow-mono create-symlinks native

11–12 ↗(On Diff #11350)

Need these so native's postinstall hook doesn't crash when it calls yarn patch-package or npx pod-patch

13 ↗(On Diff #11350)

services need the protos here

17 ↗(On Diff #11350)

Later on I'll need to add keyserver/facts and keyserver/secrets to this. We should not be copying in the files from my private dev environment into the Docker images we publish. For now I'm leaving them in to make testing easier

21 ↗(On Diff #11350)

I copied this over from the old services/identity/.dockerignore, but this file doesn't appear to exist. @varun, are you planning on adding it later?

services/identity/.dockerignore
4 ↗(On Diff #11350)

I deleted this line (rather, didn't move it over) because I'm pretty sure the .git folder only exists in the root of the repository. @varun, am I missing something?

services/tunnelbroker/.dockerignore
1 ↗(On Diff #11350)

I deleted this line (rather, didn't move it over) following discussion in the Services Team chat on Comm

Docker CLI will only look for .dockerignore file in the root directory of the context, if you have a monorepo of multiple packages, make sure .dockerignore file is on the root directory of your context, it will ignore it if it is somewhere in the subfolder.

According to the docker-compose.yml, the context for Tunnelbroker, Backup, and Blob is ../, so a single .dockerignore file in the root folder makes sense. I'll make sure the Identity service has the same context.

.dockerignore
21 ↗(On Diff #11350)

Ah, no, this line can be removed

services/identity/.dockerignore
4 ↗(On Diff #11350)

Safe to delete this. cargo init automatically initializes a git repo, but I deleted all the git files in this Rust project when I moved it into the Comm repo

This revision is now accepted and ready to land.Apr 12 2022, 12:36 PM
.dockerignore
21 ↗(On Diff #11350)

Cool, will remove

Remove services/identity/.gitignore from .dockerignore

This revision was automatically updated to reflect the committed changes.