changed location of mysql-ssh container

This commit is contained in:
SPRINX0\prochazka
2025-01-06 09:00:56 +01:00
parent 4f5bb563e8
commit a5f824c778
8 changed files with 43 additions and 13 deletions

View File

@@ -9,16 +9,16 @@ name: Build test containers
- develop
- feature/**
paths:
- e2e-tests/mysql-ssh/Dockerfile
- e2e-tests/containers
jobs:
build-docker-ssh:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Build mysql-ssh image
- name: Build mysql-ssh-login image
run: |
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
docker build -t dbgate/mysql-ssh-login:latest e2e-tests/containers/mysql-ssh-login
- name: Log in to GHCR
uses: docker/login-action@v2
with:
@@ -27,5 +27,5 @@ jobs:
password: '${{ secrets.GITHUB_TOKEN }}'
- name: Push image to GHCR
run: |
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
docker push ghcr.io/dbgate/mysql-ssh:latest
docker tag dbgate/mysql-ssh-login:latest ghcr.io/dbgate/mysql-ssh-login:latest
docker push ghcr.io/dbgate/mysql-ssh-login:latest

View File

@@ -0,0 +1,23 @@
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y openssh-server mysql-server && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /var/run/sshd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN echo 'root:root' | chpasswd
RUN service mysql start && \
mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; FLUSH PRIVILEGES;" && \
service mysql stop
EXPOSE 22
COPY start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/start.sh"]

View File

@@ -0,0 +1,7 @@
#!/bin/bash
service ssh start
service mysql start
tail -f /dev/null

View File

@@ -45,7 +45,7 @@ describe('Initialization', () => {
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
if (runOnCI) {
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh');
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-login');
} else {
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006');
}

View File

@@ -17,8 +17,8 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=Pwd2020Db
mysql-ssh:
build: mysql-ssh
mysql-ssh-login:
build: mysql-ssh-login
restart: always
ports:
- 16005:3306

View File

@@ -7,7 +7,7 @@ on:
- develop
- 'feature/**'
paths:
- "e2e-tests/mysql-ssh/Dockerfile"
- e2e-tests/containers
jobs:
build-docker-ssh:
@@ -16,9 +16,9 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3
- name: Build mysql-ssh image
- name: Build mysql-ssh-login image
run: |
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
docker build -t dbgate/mysql-ssh-login:latest e2e-tests/containers/mysql-ssh-login
- name: Log in to GHCR
uses: docker/login-action@v2
@@ -29,5 +29,5 @@ jobs:
- name: Push image to GHCR
run: |
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
docker push ghcr.io/dbgate/mysql-ssh:latest
docker tag dbgate/mysql-ssh-login:latest ghcr.io/dbgate/mysql-ssh-login:latest
docker push ghcr.io/dbgate/mysql-ssh-login:latest