diff --git a/Dockerfile b/Dockerfile index 3d8af2529..2ae015a63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ FROM ruby:3.2.0-alpine # Install docker/buildx-bin COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx +# Install 1password/op +COPY --from=1password/op:2 /usr/local/bin/op /usr/local/bin/op + # Set the working directory to /kamal WORKDIR /kamal @@ -13,11 +16,14 @@ COPY Gemfile Gemfile.lock kamal.gemspec ./ # Required in kamal.gemspec COPY lib/kamal/version.rb /kamal/lib/kamal/version.rb -# Install system dependencies -RUN apk add --no-cache build-base git docker openrc openssh-client-default \ +# Install system dependencies including CLI for supported password managers +RUN apk add --no-cache build-base git docker openrc openssh-client-default npm \ && rc-update add docker boot \ && gem install bundler --version=2.4.3 \ - && bundle install + && bundle install \ + && npm install -g @bitwarden/cli \ + && echo "https://dl-cdn.alpinelinux.org/alpine/v3.17/community" >> /etc/apk/repositories \ + && apk add --no-cache lastpass-cli # Copy the rest of our application code into the container. # We do this after bundle install, to avoid having to run bundle