Skip to content

Commit

Permalink
ci:
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTubongbanua committed Jul 4, 2023
1 parent 2b0a618 commit 484e5ed
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
11 changes: 11 additions & 0 deletions packages/sshnoports/test/end2end_tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
volumes:
- sshnpd-keys:/atsign/.atsign/keys/ # mount keys
- sshnpd-entrypoint:/atsign/entrypoint.sh # mount entrypoint
networks:
- sshnpd
depends_on:
- image-runtime-trunk
container-trunk-sshnp:
Expand All @@ -26,10 +28,19 @@ services:
volumes:
- sshnp-keys:/atsign/.atsign/keys/ # mount keys
- sshnp-entrypoint:/atsign/entrypoint.sh # mount entrypoint
networks:
- sshnp
depends_on:
- image-runtime-trunk
- container-trunk-sshnpd

networks:
sshnp:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnp
sshnpd:
driver: bridge
name: atsigncompany/sshnp-e2e-network-sshnpd

volumes:
sshnpd-keys:
Expand Down
24 changes: 6 additions & 18 deletions packages/sshnoports/test/end2end_tests/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,20 @@ RUN set -eux ; \
sed -E -i 's|^#?(PasswordAuthentication)\s.*|\1 no|' /etc/ssh/sshd_config ; \
sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 127.0.0.1/g' /etc/ssh/sshd_config ;

FROM base AS runtime-branch

COPY --chown=${USER}:${USER} --from=build-branch /app/output ${HOMEDIR}/.local/bin
FROM base AS blank

WORKDIR ${HOMEDIR}

USER ${USER}

ENTRYPOINT sudo service ssh start && sh ${HOMEDIR}/entrypoint.sh

FROM base AS runtime-release
FROM blank AS runtime-branch

COPY --chown=${USER}:${USER} --from=build-release /app/output ${HOMEDIR}/.local/bin

WORKDIR ${HOMEDIR}
COPY --chown=${USER}:${USER} --from=build-branch /app/output ${HOMEDIR}/.local/bin

USER ${USER}
FROM blank AS runtime-release

ENTRYPOINT sudo service ssh start && sh ${HOMEDIR}/entrypoint.sh
COPY --chown=${USER}:${USER} --from=build-release /app/output ${HOMEDIR}/.local/bin

FROM base AS runtime-local
FROM blank AS runtime-local

COPY --chown=${USER}:${USER} --from=build-local /app/output ${HOMEDIR}/.local/bin

WORKDIR ${HOMEDIR}

USER ${USER}

ENTRYPOINT sudo service ssh start && sh ${HOMEDIR}/entrypoint.sh
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

# Spin up an interactive container with a specific version of ssh no ports

usage() {
echo "usage: $0"
echo " -h|--help"
Expand Down

0 comments on commit 484e5ed

Please sign in to comment.