Page MenuHomePhabricator

Create root .dockerignore file
ClosedPublic

Authored by ashoat on Apr 11 2022, 4:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 7:48 AM
Unknown Object (File)
Wed, Dec 25, 10:09 PM
Unknown Object (File)
Mon, Dec 23, 1:12 AM
Unknown Object (File)
Sun, Dec 22, 8:02 AM
Unknown Object (File)
Thu, Dec 12, 2:44 PM
Unknown Object (File)
Thu, Dec 12, 11:13 AM
Unknown Object (File)
Sun, Dec 8, 10:08 PM
Unknown Object (File)
Mon, Dec 2, 10:12 AM

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
No Lint Coverage
Unit
No Test Coverage

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.