Skip to content

Commit

Permalink
Remove poetry lock
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikamotwani committed May 1, 2024
1 parent 9b51afe commit b7830ea
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 9 deletions.
62 changes: 54 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,63 @@
# This image has selenium and chrome driver already installed
# # This image has selenium and chrome driver already installed
FROM rofrano/pipeline-selenium:latest

# Become a regular user for development
# # Become a regular user for development
# ARG USERNAME=vscode
# USER $USERNAME

# # Install user mode tools
# COPY .devcontainer/scripts/install-tools.sh /tmp/
# RUN cd /tmp; bash ./install-tools.sh

# # Set up the Python development environment
# WORKDIR /app
# COPY pyproject.toml poetry.lock ./
# RUN sudo python -m pip install --upgrade pip poetry && \
# sudo poetry config virtualenvs.create false && \
# sudo poetry install && \
# sudo poetry lock --no-update

# Image for a Python 3 development environment
FROM python:3.11-slim

# Add any tools that are needed beyond Python 3.11
RUN apt-get update && \
apt-get install -y sudo vim make git zip tree curl wget jq procps net-tools build-dep python-psycopg2 libpq-dev && \
apt-get autoremove -y && \
apt-get clean -y

RUN sudo python -m pip install psycopg2 psycopg2-binary

# Create a user for development
ARG USERNAME=vscode
USER $USERNAME
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Install user mode tools
COPY .devcontainer/scripts/install-tools.sh /tmp/
RUN cd /tmp; bash ./install-tools.sh
# Create the user with passwordless sudo privileges
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
&& usermod -aG sudo $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& chown -R $USERNAME:$USERNAME /home/$USERNAME

# Set up the Python development environment
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN sudo python -m pip install -U pip poetry && \
RUN sudo python -m pip install --upgrade pip poetry && \
sudo poetry config virtualenvs.create false && \
sudo poetry install
sudo poetry install

ENV PORT 8080
EXPOSE $PORT

# Enable color terminal for docker exec bash
ENV TERM=xterm-256color

# Become a regular user for development
USER $USERNAME

# Install user mode tools
COPY .devcontainer/scripts/install-tools.sh /tmp/
RUN cd /tmp && bash ./install-tools.sh

1 change: 0 additions & 1 deletion .github/workflows/bdd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
run: |
python -m pip install -U pip poetry
poetry config virtualenvs.create false
poetry lock
poetry install
- name: Run the service locally
Expand Down

0 comments on commit b7830ea

Please sign in to comment.