-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(docker): leverage cache mount with bind mounts
This update eliminates the need for external tools like cargo-chef to leverage caching layers, resulting in an average build time reduction of 4m30s (~36% improvement). While this solution doesn't fully resolve the issues mentioned in #6169 (comment), it represents the best possible approach without resorting to custom solutions, which we'd prefer to avoid.
- Loading branch information
1 parent
cdb9efd
commit 35c41a6
Showing
3 changed files
with
248 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### Building and running your application | ||
|
||
When you're ready, start your application by running: | ||
`docker compose up --build`. | ||
|
||
Your application will be available at http://localhost:8233. | ||
|
||
### Deploying your application to the cloud | ||
|
||
First, build your image, e.g.: `docker build -t myapp .`. | ||
If your cloud uses a different CPU architecture than your development | ||
machine (e.g., you are on a Mac M1 and your cloud provider is amd64), | ||
you'll want to build the image for that platform, e.g.: | ||
`docker build --platform=linux/amd64 -t myapp .`. | ||
|
||
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. | ||
|
||
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) | ||
docs for more detail on building and pushing. | ||
|
||
### References | ||
* [Docker's Rust guide](https://docs.docker.com/language/rust/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.