From 46d50c8b13a0dc5828175c8119ee4c386eeb786c Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 27 Dec 2018 21:14:42 -0500 Subject: [PATCH] Dockerfile --- Dockerfile | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a70a02..f9056de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,38 +1,14 @@ -FROM ubuntu:16.04 -MAINTAINER Tobe O +FROM google/dart:2.0 -# Install Dart SDK. -RUN sudo apt-get update -RUN sudo apt-get install -y apt-transport-https -RUN sudo apt-get install -y curl -RUN sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' - -# Uncomment this for Dart 1.24.x -# RUN sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' - -# Comment this out if not installing Dart 2.x -RUN sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list' - -RUN sudo apt-get update -RUN sudo apt-get install -y dart -RUN export PATH="/usr/lib/dart/bin:$PATH" - -# Copy necessary files -ADD bin/ bin/ -ADD config/ config/ -ADD lib/ lib/ -ADD tool/ tool/ -ADD views/ views/ -ADD web/ web/ -ADD pubspec.yaml pubspec.yaml +COPY ./ ./ # Install dependencies, pre-build -RUN /usr/lib/dart/bin/pub get -RUN /usr/lib/dart/bin/dart tool/build.dart -RUN /usr/lib/dart/bin/pub build +RUN pub get + +# Optionally build generaed sources. +# RUN pub run build_runner build # Set environment, start server ENV ANGEL_ENV=production EXPOSE 3000 -ENTRYPOINT ["/usr/lib/dart/bin/dart"] -CMD ["bin/prod.dart"] \ No newline at end of file +CMD dart bin/prod.dart \ No newline at end of file