2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HerokuでDockerでTrusterdを動かすまで 準備編その0

Last updated at Posted at 2015-05-08

参考記事

Dockerfile

とりあえず、build_configを編集したら

heroku docker:start

を実行する際にmrubyをリビルドするようにしてみた。

FROM heroku/cedar:14

RUN useradd -d /app -m app
RUN chown app:app -R /app

WORKDIR /app

ENV HOME /app
ENV PORT 3000

# install mruby
WORKDIR /app
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y install git libmagick++-dev
USER app
RUN git clone https://github.com/mruby/mruby.git
#RUN mkdir -p /app/heroku/trusterd
#RUN curl -s https://s3pository.heroku.com/node/v$NODE_ENGINE/node-v$NODE_ENGINE-linux-x64.tar.gz | tar --strip-components=1 -x -C /app/heroku/trusterd
#ENV PATH /app/heroku/trusterd/bin:$PATH

RUN mkdir -p /app/.profile.d
#RUN echo "export PATH=\"/app/heroku/trusterd/bin:\$PATH\"" > /app/.profile.d/trusterd.sh
#RUN echo "cd /app/src" >> /app/.profile.d/trusterd.sh

EXPOSE 3000

#RUN curl -s http://78.108.103.11/MIRROR/ftp/GraphicsMagick/1.3/GraphicsMagick-1.3.21.tar.gz | tar xvz -C /tmp
#WORKDIR /tmp/GraphicsMagick-1.3.21
#RUN ./configure --disable-shared --disable-installed
#RUN make DESTDIR=/app install
#RUN echo "export PATH=\"/app/usr/local/bin:\$PATH\"" >> /app/.profile.d/nodejs.sh
#ENV PATH /app/usr/local/bin:$PATH
ONBUILD RUN mkdir -p /app/src
ONBUILD WORKDIR /app/src
#ONBUILD COPY package.json /app/src/package.json
ONBUILD COPY ./build_config.rb /app/mruby/build_config.rb
#ONBUILD RUN npm install
ONBUILD WORKDIR /app/mruby
ONBUILD RUN ./minirake

ONBUILD COPY . /app/src

が、問題が

最近作り始めたmruby-mrmagickを早速このbuild_config.rbに加えて

MRuby::Build.new do |conf|
  toolchain :gcc
  conf.gembox "default"

  conf.gem github: "iij/mruby-pack"
  conf.gem github: "iij/mruby-io"
  conf.gem github: "iij/mruby-socket"
  conf.gem github: "mattn/mruby-http"
  conf.gem github: "matsumoto-r/mruby-simplehttpserver"
  conf.gem github: "kjunichi/mruby-mrmagick"
end

としたが、Magick++-configコマンドがないとエラー!

結局Dockerfileにapt-get install にimagemagickを加える事になりましたとさ。

さらに悪いことに

Herokuにデプロイしたところ、

2015-05-08T22:13:28.658784+00:00 heroku[web.1]: Starting process with command `/app/mruby/bin/mruby /app/src/server.rb 54430`
2015-05-08T22:13:30.122433+00:00 app[web.1]: /app/mruby/bin/mruby: error while loading shared libraries: libMagick++.so.5: cannot open shared object file: No such file or directory

ここまでのおはなし

暗雲立ち込めてきた。。。

ところで

Herokuはhttp2に対応しているの?

hint:

続き

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?