Docker
- 5 ответов
- 0 вопросов
1
Вклад в тег
ARG BUILD_VERSION=1
FROM alpine AS base
RUN touch base
FROM base AS build-1
RUN touch build-1
FROM base AS build-2
RUN touch build-2
FROM build-${BUILD_VERSION}
RUN touch finish
docker build --build-arg BUILD_VERSION=2 .
ARG RAILS_ENV=development
RUN if [ "$RAILS_ENV" = "production" ]; then \
bundle install --without development test; \
else \
bundle install; \
fi
docker build --build-arg RAILS_ENV=production .