diff --git a/clients-api/src/Dockerfile b/clients-api/src/Dockerfile index ee2e5766..a6de0db5 100644 --- a/clients-api/src/Dockerfile +++ b/clients-api/src/Dockerfile @@ -10,4 +10,4 @@ WORKDIR /app COPY --from=build-env /app/publish . EXPOSE 5003 ENV ASPNETCORE_URLS "http://*:5003" -CMD dotnet ACG.EKS.Bookstore.Clients-API.dll \ No newline at end of file +CMD dotnet ACG.EKS.Bookstore.Clients-API.dll diff --git a/front-end/Dockerfile b/front-end/Dockerfile index 34656b9f..f4b8897c 100644 --- a/front-end/Dockerfile +++ b/front-end/Dockerfile @@ -1,10 +1,10 @@ -FROM node:carbon-alpine -WORKDIR /opt/forms -COPY package*.json ./ -RUN npm install -COPY . ./ +FROM public.ecr.aws/bitnami/node:8 as builder +WORKDIR /app +COPY package*.json /app/ +RUN npm --unsafe-perm install +COPY . /app RUN npm run build -FROM nginx:1.15-alpine -COPY --from=0 /opt/forms/dist /usr/share/nginx/html +FROM public.ecr.aws/nginx/nginx:1.18-alpine +COPY --from=builder /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/inventory-api/src/Dockerfile b/inventory-api/src/Dockerfile index b87ccc33..c5c1c1ff 100644 --- a/inventory-api/src/Dockerfile +++ b/inventory-api/src/Dockerfile @@ -1,8 +1,8 @@ -FROM node:10 -WORKDIR /usr/src/app -COPY package*.json ./ +FROM public.ecr.aws/bitnami/node:10-prod +WORKDIR /app +COPY package*.json /app/ RUN npm install -COPY . . +COPY . /app EXPOSE 5001 -CMD node app.js \ No newline at end of file +CMD node app.js diff --git a/renting-api/api/Dockerfile b/renting-api/api/Dockerfile index bb5be81f..7c160062 100644 --- a/renting-api/api/Dockerfile +++ b/renting-api/api/Dockerfile @@ -1,12 +1,11 @@ -FROM ruby:2.6.3 - -# RUN bundle config --delete frozen -# RUN bundle config --global frozen 1 - -WORKDIR /usr/src/app - -COPY Gemfile Gemfile.lock ./ +FROM public.ecr.aws/bitnami/ruby:2.6.6 as builder +COPY . /app +WORKDIR /app +RUN bundle config set deployment 'true' RUN bundle install -COPY . . -CMD ["bundle", "exec", "rails", "server", "-p", "5004", "-b", "0.0.0.0"] \ No newline at end of file +FROM public.ecr.aws/bitnami/ruby:2.6.6-prod +COPY --from=builder /app /app +WORKDIR /app + +CMD ["bundle", "exec", "rails", "server", "-p", "5004", "-b", "0.0.0.0"] diff --git a/renting-api/api/Gemfile b/renting-api/api/Gemfile index 0b1a9e91..a8c9a513 100644 --- a/renting-api/api/Gemfile +++ b/renting-api/api/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.6.3' +ruby '2.6.6' # AWS SDK gem 'aws-sdk', '~> 3' diff --git a/renting-api/api/Gemfile.lock b/renting-api/api/Gemfile.lock index 592d6815..4b8e1c7d 100644 --- a/renting-api/api/Gemfile.lock +++ b/renting-api/api/Gemfile.lock @@ -1061,7 +1061,7 @@ DEPENDENCIES tzinfo-data RUBY VERSION - ruby 2.6.3p62 + ruby 2.6.6p146 BUNDLED WITH - 1.17.2 + 2.1.4 diff --git a/resource-api/src/Dockerfile b/resource-api/src/Dockerfile index cb189099..22479836 100644 --- a/resource-api/src/Dockerfile +++ b/resource-api/src/Dockerfile @@ -1,5 +1,5 @@ -FROM python:3 +FROM public.ecr.aws/bitnami/python:3.9 ADD requirements.txt requirements.txt RUN pip install -r requirements.txt -ADD . / -CMD [ "gunicorn", "--worker-tmp-dir", "/dev/shm", "--bind", "0.0.0.0:5000", "wsgi:app" ] \ No newline at end of file +ADD . /app +CMD [ "gunicorn", "--worker-tmp-dir", "/dev/shm", "--bind", "0.0.0.0:5000", "wsgi:app" ]