diff --git a/Dockerfile b/Dockerfile index 734be525d..a15c05a6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN rm $(which buffalo) RUN rm -rf $BP RUN mkdir -p $BP WORKDIR $BP -ADD . . +COPY . . RUN go get github.com/gobuffalo/buffalo-pop RUN make deps diff --git a/Dockerfile.build b/Dockerfile.build index 8071029c3..1ea3dfd20 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -37,10 +37,10 @@ RUN npm install -g --no-progress yarn \ RUN rm -rfv $BP && mkdir -p $BP WORKDIR $BP - -ADD . . +COPY . . RUN make deps && make install + # cache yarn packages to an offline mirror so they're faster to load. hopefully. RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \ && yarn install --no-progress diff --git a/Dockerfile.slim.build b/Dockerfile.slim.build index 38bb7a70b..bba18fc23 100644 --- a/Dockerfile.slim.build +++ b/Dockerfile.slim.build @@ -2,7 +2,7 @@ FROM golang:alpine EXPOSE 3000 ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo RUN apk add --no-cache --upgrade apk-tools \ -&& apk add --no-cache bash curl openssl git build-base yarn nodejs postgresql libpq postgresql-contrib sqlite sqlite-dev mysql-client vim +&& apk add --no-cache bash curl openssl git build-base nodejs npm postgresql libpq postgresql-contrib sqlite sqlite-dev mysql-client vim RUN go version && go get -v -u github.com/markbates/deplist/deplist @@ -24,7 +24,7 @@ RUN go get -u github.com/golang/dep/cmd/dep \ && go get -u github.com/alecthomas/gometalinter \ && gometalinter --install -RUN npm install -g --no-progress yarn \ +RUN npm i -g --no-progress yarn \ && yarn config set yarn-offline-mirror /npm-packages-offline-cache \ && yarn config set yarn-offline-mirror-pruning true @@ -32,8 +32,8 @@ RUN npm install -g --no-progress yarn \ RUN rm -rfv $BP && mkdir -p $BP WORKDIR $BP -ADD . . -RUN go get -tags "sqlite" -v -t github.com/gobuffalo/buffalo/... && make install +COPY . . +RUN make deps && make install # cache yarn packages to an offline mirror so they're faster to load. hopefully. RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \