Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build fails #1

Open
C24IO opened this issue Jan 16, 2016 · 3 comments
Open

docker build fails #1

C24IO opened this issue Jan 16, 2016 · 3 comments

Comments

@C24IO
Copy link

C24IO commented Jan 16, 2016

I am getting this error after following the excellent tutorial at - http://prakhar.me/docker-curriculum/
Thanks for posting the guide btw ! Error follows -

---> 038991bef88d
Removing intermediate container 6f941a872fa0
Step 10 : RUN npm run build
---> Running in 0f4d249d7776

sf-food@0.0.1 build /opt/flask-app
NODE_ENV='production' webpack -p

webpack 1.12.11
Usage: https://webpack.github.io/docs/cli.html

Options:
--help, -h, -?
--config
--context
--entry
--module-bind
--module-bind-post
--module-bind-pre
--output-path
--output-file
--output-chunk-file
--output-named-chunk-file
--output-source-map-file
--output-public-path
--output-jsonp-function
--output-pathinfo
--output-library
--output-library-target
--records-input-path
--records-output-path
--records-path
--define
--target
--cache [default: true]
--watch, -w
--watch which closes when stdin ends
--watch-aggregate-timeout
--watch-poll
--hot
--debug
--devtool
--progress
--resolve-alias
--resolve-loader-alias
--optimize-max-chunks
--optimize-min-chunk-size
--optimize-minimize
--optimize-occurence-order
--optimize-dedupe
--prefetch
--provide
--labeled-modules
--plugin
--bail
--profile
-d shortcut for --debug --devtool sourcemap --output-pathinfo
-p shortcut for --optimize-minimize
--json, -j
--colors, -c
--sort-modules-by
--sort-chunks-by
--sort-assets-by
--hide-modules
--display-exclude
--display-modules
--display-chunks
--display-error-details
--display-origins
--display-cached
--display-cached-assets
--display-reasons, --verbose, -v

Output filename not configured.
npm ERR! weird error 255
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0
The command '/bin/sh -c npm run build' returned a non-zero code: 1

@prakhar1989
Copy link
Owner

Hey @C24IO, can you share the Dockerfile that you're using?

@C24IO
Copy link
Author

C24IO commented Jan 16, 2016

Here it is:

# start from base
FROM ubuntu:14.04
MAINTAINER Chaitanya Hazarey <c@24.io>

# install system-wide deps for python and node

RUN apt-get -yqq update
RUN apt-get -yqq install python-pip python-dev
RUN apt-get -yqq install nodejs npm
RUN ln -s /usr/bin/nodejs /usr/bin/node

# copy our application code

ADD flask-app /opt/flask-app
WORKDIR /opt/flask-app

# fetch app specific deps

RUN npm install
RUN npm run build
RUN pip install -r requirements.txt

# expose port
EXPOSE 5000

# start app
CMD [ "python", "./app.py" ]

@gkbijarniya
Copy link

gkbijarniya commented May 8, 2016

@C24IO update file package.json as below given.

"build": "NODE_ENV='production' webpack -p --output-filename webpack.log"

it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants