GeoSales-Evolution / self-deployable-docker

Docker repo capable of deploying itself... or something like that
MIT License
2 stars 2 forks source link

Ouroborus hello world, ruby + docker #5

Closed jeffque closed 1 year ago

jeffque commented 1 year ago

Actually, docker isn't properly installing the gems requested to just run a docker run ouroborus:latest

But work in "debug mode".

Also, created a simple Makefile to create image and run the container with proper configuration:

jeffque commented 1 year ago
$ make run
docker build . -t ouroborus:latest
Sending build context to Docker daemon  10.24kB
Step 1/8 : FROM ruby:3-alpine
 ---> 3ec07ba3eccd
Step 2/8 : WORKDIR /app
 ---> Using cache
 ---> 231bd59bcbda
Step 3/8 : EXPOSE 8000
 ---> Using cache
 ---> ac623db25ca9
Step 4/8 : COPY Gemfile Gemfile.lock ouroborus.gemspec /app/
 ---> fbb420330b67
Step 5/8 : RUN bundle install
 ---> Running in 9578d865f188
gemspec executando
gemspec executado
gem webrick as dep
gemspec executando
gemspec executado
gem webrick as dep
Fetching gem metadata from https://rubygems.org/.
Using ouroborus 0.0.1 from source at `.` and installing its executables
Using bundler 2.3.7
Fetching webrick 1.7.0
Installing webrick 1.7.0
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Removing intermediate container 9578d865f188
 ---> 7af525c1369f
Step 6/8 : COPY lib/ /app/lib/
 ---> e5d8643f0c3f
Step 7/8 : COPY bin/ /app/bin/
 ---> c86fe817bc5d
Step 8/8 : ENTRYPOINT bundle exec ouroborus
 ---> Running in 264ead48581a
Removing intermediate container 264ead48581a
 ---> 8765998c0d0e
Successfully built 8765998c0d0e
Successfully tagged ouroborus:latest
touch .image
docker run -it ouroborus:latest
bundler: command not found: ouroborus
Install missing gem executables with `bundle install`
make: *** [Makefile:4: run] Error 127