Skip to content

Commit

Permalink
Update docker-compose.yml and Dockerfiles (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu authored Aug 18, 2024
1 parent 0f268fc commit 10c4dcd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/.dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG UBUNTU_VERSION
ARG UBUNTU_VERSION=22.04

FROM ubuntu:$UBUNTU_VERSION

Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml → compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.7'

services:
server:
build:
Expand All @@ -9,7 +7,7 @@ services:
UBUNTU_VERSION: '22.04'
LOGIN_USER: 'docker'
WORKSPACE: '/home/docker/.autotesting'
image: markus-autotest-server-dev:1.1.0
image: markus-autotest-server-dev:1.2.0
volumes:
- ./server:/app:cached
- workspace:/home/docker/.autotesting:rw
Expand All @@ -29,7 +27,7 @@ services:
dockerfile: ./.dockerfiles/Dockerfile
args:
UBUNTU_VERSION: '22.04'
image: markus-autotest-client-dev:1.1.0
image: markus-autotest-client-dev:1.2.0
container_name: 'autotest-client'
volumes:
- ./client:/app:cached
Expand All @@ -46,7 +44,7 @@ services:
- markus_dev

postgres:
image: postgres:10
image: postgres:14
volumes:
- postgres_autotest:/var/lib/postgresql/data
environment:
Expand All @@ -56,7 +54,7 @@ services:
- '45432:5432'

redis:
image: redis:3.2-alpine
image: redis:7
volumes:
- redis_autotest:/data
ports:
Expand Down
8 changes: 3 additions & 5 deletions server/.dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG UBUNTU_VERSION
ARG UBUNTU_VERSION=22.04

FROM ubuntu:$UBUNTU_VERSION as base
FROM ubuntu:$UBUNTU_VERSION AS base


ARG LOGIN_USER
Expand All @@ -9,9 +9,7 @@ ARG WORKSPACE
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:deadsnakes/ppa && \
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.7 \
python3.7-venv \
python3.8 \
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.8 \
python3.8-venv \
python3.9 \
python3.9-venv \
Expand Down
2 changes: 1 addition & 1 deletion server/autotest_server/testers/jupyter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create_environment(settings_, env_dir, _default_env_dir):
def settings():
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings_schema.json")) as f:
settings_ = json.load(f)
py_versions = [f"3.{x}" for x in range(7, 13) if shutil.which(f"python3.{x}")]
py_versions = [f"3.{x}" for x in range(8, 13) if shutil.which(f"python3.{x}")]
python_versions = settings_["properties"]["env_data"]["properties"]["python_version"]
python_versions["enum"] = py_versions
python_versions["default"] = py_versions[-1]
Expand Down
2 changes: 1 addition & 1 deletion server/autotest_server/testers/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create_environment(settings_, env_dir, _default_env_dir):
def settings():
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings_schema.json")) as f:
settings_ = json.load(f)
py_versions = [f"3.{x}" for x in range(7, 13) if shutil.which(f"python3.{x}")]
py_versions = [f"3.{x}" for x in range(8, 13) if shutil.which(f"python3.{x}")]
python_versions = settings_["properties"]["env_data"]["properties"]["python_version"]
python_versions["enum"] = py_versions
python_versions["default"] = py_versions[-1]
Expand Down
2 changes: 1 addition & 1 deletion server/autotest_server/testers/pyta/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def create_environment(settings_, env_dir, _default_env_dir):
def settings():
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings_schema.json")) as f:
settings_ = json.load(f)
py_versions = [f"3.{x}" for x in range(7, 13) if shutil.which(f"python3.{x}")]
py_versions = [f"3.{x}" for x in range(8, 13) if shutil.which(f"python3.{x}")]
python_versions = settings_["properties"]["env_data"]["properties"]["python_version"]
python_versions["enum"] = py_versions
python_versions["default"] = py_versions[-1]
Expand Down

0 comments on commit 10c4dcd

Please sign in to comment.