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 .
CA certificates
If you are going to require validation of the other side of the connection’s certificate, you need to provide a “CA certs” file, filled with the certificate chains for each issuer you are willing to trust. Again, this file just contains these chains concatenated together. For validation, Python will use the first chain it finds in the file which matches. The platform’s certificates file can be used by calling SSLContext.load_default_certs(), this is done automatically with create_default_context().
SSLContext.load_default_certs(purpose=Purpose.SERVER_AUTH)¶
Load a set of default “certification authority” (CA) certificates from default locations. On Windows it loads CA certs from the CA and ROOT system stores. On other systems it calls SSLContext.set_default_verify_paths(). In the future the method may load CA certificates from other locations, too.
The purpose flag specifies what kind of CA certificates are loaded. The default settings Purpose.SERVER_AUTH loads certificates, that are flagged and trusted for TLS web server authentication (client side sockets). Purpose.CLIENT_AUTH loads CA certificates for client certificate verification on the server side.