Hi everyone! Not sure if this is the place to ask ...
# troubleshooting
g
Hi everyone! Not sure if this is the place to ask but here goes. I developed a tap inside a private repository and now I am working on bringing that in as an extractor in a meltano.yml file. I am pretty new to Docker but am struggling with getting the
RUN meltano install
step working since installing the tap from the private repo requires ssh keys to be set in the image. Would appreciate any tips or feedback on how to get around this, thanks!
v
Could you share your docker file you have so far, and issues you're hitting?
g
Sure thing:
Copy code
# <http://registry.gitlab.com/meltano/meltano:latest|registry.gitlab.com/meltano/meltano:latest> is also available in GitLab Registry
ARG MELTANO_IMAGE=meltano/meltano:latest
ARG SSH_KEY
FROM $MELTANO_IMAGE

WORKDIR /classy/dasa-etl

# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt

# TMP add github keys
RUN mkdir /root/.ssh
RUN ssh-keyscan -t rsa <http://bitbucket.org|bitbucket.org> >> /root/.ssh/known_hosts
RUN echo "$SSH_KEY" > /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa

RUN ssh -v <mailto:git@bitbucket.org|git@bitbucket.org>

# Install all plugins into the `.meltano` directory
COPY ./meltano.yml .
RUN meltano install

# Pin `discovery.yml` manifest by copying cached version to project root
RUN cp -n .meltano/cache/discovery.yml . 2>/dev/null || :

# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1

# Copy over remaining project files
COPY . .

# Expose default port used by `meltano ui`
EXPOSE 5000

ENTRYPOINT ["meltano"]
It fails on checking the ssh connectivity with this output:
running the build with
docker build --no-cache --build-arg SSH_KEY=$SSH_KEY -t test/etl .
v
Right so your docker container can't SSH to whatever is specified in your yaml config. If you want to see the exact command that's ran run meltano in debug mode https://docs.meltano.com/reference/command-line-interface#debugging The same way you setup SSH on your machine you have to do something similar (ish) on your docker container. There's other ways. Like copy all of the dependent tap/target repos into your repo. (Extracts/Target folder maybe?) then point your meltano install to these local folders