Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(internal mirror cache) Unable to locate package apt-transport-https #144

Closed
perber opened this issue Jan 5, 2023 · 1 comment
Closed

Comments

@perber
Copy link

perber commented Jan 5, 2023

In order to communicate internally with the artifactory (which we use as a mirror cache),
the package apt-transport-https is needed in the image.
(Communication with the Artifactory is carried out internally via HTTPS).

When trying to install new packages, we ran into the following problem:

E: Unable to locate package apt-transport-https

No apt-get update can be performed because the package apt-transport-https is missing.

We have now created a workaround by pulling the package via our proxy.
In my opinion, this should not be necessary.

Here you can find the Docker image as we currently have it configured. (Proxy is also added to the example.)

FROM artifactory.yyy.at/docker-group-yyy/katalonstudio/katalon:8.3.5

RUN rm /etc/apt/sources.list.d/google-chrome.list

# set the proxy for creating the runtime environment
ARG YYY_PROXY

# add proxy settings to access the internet via http (this is needed so we can first install the gnupg2 needed in apt-key add command)
ENV http_proxy="${YYY_PROXY}"
ENV https_proxy="${YYY_PROXY}"

ENV no_proxy=".yyy.at,.cluster.local"
# add proxy selfsigned certificates to access the internet via https
ADD https://proxy-cert.yyy.at:9999/files/yyy_web_gateway.cer /usr/local/share/ca-certificates/yyy.crt
RUN chmod 644 /usr/local/share/ca-certificates/yyy.crt && \
    update-ca-certificates

RUN apt-get update && apt-get install apt-transport-https

# unset proxy
ENV http_proxy=""
ENV https_proxy=""

RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \
    && rm -rf /etc/apt/sources.list.d \
    && echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }" \
    && sh -c "echo '' > /etc/apt/sources.list" \  
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial main' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial universe' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial stable' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial-security main' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial-updates main' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial-security universe' >> /etc/apt/sources.list" \
    && sh -c "echo 'deb [trusted=yes] https://artifactory.yyy.at/artifactory/debian-remote-ubuntu xenial-updates universe' >> /etc/apt/sources.list" \
    && apt-get update

# apt-get and system utilities
RUN apt-get install --yes jq nano zip ffmpeg \
    && rm -rf /var/lib/apt/lists/*

COPY docker/katalon_licences /home/katalon/.katalon/license
COPY docker/run_tests.sh /home/katalon/run_tests.sh

WORKDIR /

RUN mkdir -p /home/katalon && \
    groupadd -g 1000 katalon && \
    useradd --no-log-init -g 1000 -u 1000 katalon && \
    mkdir -p /katalon; chown -R katalon:katalon /katalon && \
    mkdir -p /tests; chown -R katalon:katalon /tests && \
    mkdir -p /opt; chown -R katalon:katalon /opt && \
    mkdir -p /home/katalon; chown -R katalon:katalon /home/katalon && \
    chmod +x /home/katalon/run_tests.sh
USER 1000

ENTRYPOINT ["/bin/bash", "-c"]

CMD ["/home/katalon/run_tests.sh"]
@perber
Copy link
Author

perber commented Jan 5, 2023

I found a pull request which addresses the issue: #126

@perber perber closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant