Permalink
Browse files

rename dockerfiles

  • Loading branch information...
tongueroo committed Aug 5, 2018
1 parent d3fcff7 commit 2c60670148ec85c71dfebc3fdee1723da00a73e3
Showing with 77 additions and 64 deletions.
  1. +13 −0 .codebuild/buildspec-base.yml
  2. +10 −48 Dockerfile
  3. +0 −16 Dockerfile.2
  4. +54 −0 Dockerfile.base
@@ -0,0 +1,13 @@
version: 0.2

phases:
build:
commands:
- echo Build started on `date`
- docker build -t tongueroo/jets:base -f Dockerfile.base .
- # TODO: docker login commamnds with env vars
- docker push tongueroo/jets

artifacts:
files:
- README.md
@@ -1,54 +1,16 @@
FROM ruby:2.5.1
FROM tongueroo/jets:base
MAINTAINER Tung Nguyen <tongueroo@gmail.com>

RUN apt-get update && \
apt-get install -y net-tools netcat && \
rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get purge

# Packages
# capybara-webkit: libqt4-dev libqtwebkit-dev
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:git-core/ppa -y && \
apt-get update && \
apt-get install -y \
build-essential \
libqt4-dev libqtwebkit-dev \
nodejs \
telnet \
curl \
vim \
htop \
mysql-client \
lsof && \
rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get purge

# ssh key for bundle to access gems that are in private repos
# COPY config/ssh /root/.ssh
# RUN chmod 600 /root/.ssh/id_rsa-boltops-docker

# Install bundle of gems
RUN gem install bundler
# Install bundle of gems first in a layer
# so if the Gemfile doesnt chagne it wont have to install gems again
WORKDIR /tmp
COPY lib/jets/version.rb /tmp/lib/jets/version.rb
COPY jets.gemspec /tmp/
COPY Gemfile* /tmp/
RUN bundle install --jobs=4 --retry=3 && rm -rf /root/.bundle/cache

# Do not try to precompile assets here because it could resurrect files
# This happened with config/initializers/rollbar.rb.

# Add development like customizations
# COPY config/home/irbrc /root/.irbrc
ENV TERM xterm

# https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-convenience-script
# Install docker client because we're going to use docker to
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
RUN bundle install && rm -rf /root/.bundle/cache

COPY .codebuild/scripts /tmp/scripts
RUN bash -eux /tmp/scripts/install-docker-compose.sh
RUN bash -exu /tmp/scripts/install-java.sh
RUN bash -exu /tmp/scripts/install-dynamodb-local.sh
# Add the Rails app
ENV HOME /root
WORKDIR /app
COPY . /app
RUN bundle install

CMD ["/bin/bash"]
CMD ["uptime"]

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,54 @@
FROM ruby:2.5.1
MAINTAINER Tung Nguyen <tongueroo@gmail.com>

RUN apt-get update && \
apt-get install -y net-tools netcat && \
rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get purge

# Packages
# capybara-webkit: libqt4-dev libqtwebkit-dev
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:git-core/ppa -y && \
apt-get update && \
apt-get install -y \
build-essential \
libqt4-dev libqtwebkit-dev \
nodejs \
telnet \
curl \
vim \
htop \
mysql-client \
lsof && \
rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get purge

# ssh key for bundle to access gems that are in private repos
# COPY config/ssh /root/.ssh
# RUN chmod 600 /root/.ssh/id_rsa-boltops-docker

# Install bundle of gems
RUN gem install bundler
WORKDIR /tmp
COPY lib/jets/version.rb /tmp/lib/jets/version.rb
COPY jets.gemspec /tmp/
COPY Gemfile* /tmp/
RUN bundle install --jobs=4 --retry=3 && rm -rf /root/.bundle/cache

# Do not try to precompile assets here because it could resurrect files
# This happened with config/initializers/rollbar.rb.

# Add development like customizations
# COPY config/home/irbrc /root/.irbrc
ENV TERM xterm

# https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-convenience-script
# Install docker client because we're going to use docker to
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

COPY .codebuild/scripts /tmp/scripts
RUN bash -eux /tmp/scripts/install-docker-compose.sh
RUN bash -exu /tmp/scripts/install-java.sh
RUN bash -exu /tmp/scripts/install-dynamodb-local.sh

CMD ["/bin/bash"]

0 comments on commit 2c60670

Please sign in to comment.