Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Fixed issue with workdir in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
DerKnerd committed Jun 14, 2022
1 parent fd2be25 commit ef3bb1c
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
FROM quay.imanuel.dev/dockerhub/library---dart:sdk AS build
FROM quay.imanuel.dev/dockerhub/library---golang:1.18-alpine AS build

# Resolve app dependencies.
WORKDIR /app
COPY pubspec.* ./
RUN dart pub get
COPY . .
RUN apk add git

# Copy app source code and AOT compile it.
COPY server .
# Ensure packages are still up-to-date if anything has changed
RUN dart pub get --offline
RUN dart compile exe bin/server.dart -o bin/server
RUN dart compile exe bin/console.dart -o bin/console
RUN go build -o /app/jinya-backup jinya-backup

FROM quay.imanuel.dev/dockerhub/library---node:latest AS build-frontend
COPY server/frontend /app/frontend
RUN cd /app/frontend && npm install
COPY web/ /app/web
RUN cd /app/web && npm install

FROM quay.imanuel.dev/dockerhub/library---alpine:latest
COPY --from=build /runtime/ /
COPY --from=build /app/bin/server /bin/
COPY --from=build /app/bin/console /bin/
COPY --from=build /app/docker/entrypoint.sh /
COPY --from=build-frontend /app/frontend /frontend
WORKDIR /app
COPY --from=build /app/jinya-backup /app/jinya-backup
COPY --from=build-frontend /app/web /app/web

# Start server.
ENTRYPOINT "/entrypoint.sh"
ENTRYPOINT ["/app/jinya-backup", "serve"]

0 comments on commit ef3bb1c

Please sign in to comment.