Skip to content

Commit

Permalink
Dockerfiles moved to root for shared libraries (flutter#4071)
Browse files Browse the repository at this point in the history
Fixes locally what was previously failing

```
> docker build -t test -f Dockerfile.app_dart

Downloading packages...
...
+ cocoon_server 0.0.0 from path ../cocoon_server
```
  • Loading branch information
jtmcdole authored Dec 4, 2024
1 parent 2bf8bbc commit 09fad27
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion app_dart/Dockerfile → Dockerfile.app_dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:8f9ccb89e68772720fbedf48baf0f6cc1bf61a6d1fd9962c3a418adbd89bdca0

WORKDIR /cocoon_server

COPY cocoon_server .

WORKDIR /app

# Copy app source code (except anything in .dockerignore).
COPY . .
COPY app_dart .

RUN dart pub get

# Start server.
Expand Down
6 changes: 5 additions & 1 deletion auto_submit/Dockerfile → Dockerfile.auto_submit
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:8f9ccb89e68772720fbedf48baf0f6cc1bf61a6d1fd9962c3a418adbd89bdca0

WORKDIR /cocoon_server

COPY cocoon_server .

WORKDIR /app

# Copy app source code (except anything in .dockerignore).
COPY . .
COPY auto_submit .
RUN dart pub get

# Start server.
Expand Down
2 changes: 1 addition & 1 deletion app_dart/cloudbuild_app_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:

# Build docker image
- name: 'us-docker.pkg.dev/cloud-builders/ga/v1/docker'
args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/default.version-$SHORT_SHA', 'app_dart']
args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/default.version-$SHORT_SHA', '-f', 'Dockerfile.app_dart']

# Trigger the cloud build that deploys the docker image
- name: gcr.io/cloud-builders/gcloud
Expand Down
2 changes: 1 addition & 1 deletion auto_submit/cloudbuild_auto_submit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
steps:
# Build docker image
- name: 'us-docker.pkg.dev/cloud-builders/ga/v1/docker'
args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/auto-submit.version-$SHORT_SHA', 'auto_submit']
args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/auto-submit.version-$SHORT_SHA', '-f', 'Dockerfile.auto_submit']

# Trigger the cloud build that deploys the docker image
- name: gcr.io/cloud-builders/gcloud
Expand Down

0 comments on commit 09fad27

Please sign in to comment.