Skip to content

Commit

Permalink
fix: docker container failing to build
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanzyTHEbar committed Mar 25, 2023
1 parent 45c04a1 commit 9d27b94
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
"version": "3.11"
}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"streetsidesoftware.code-spell-checker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-azuretools.vscode-docker",
"wayou.vscode-todo-highlight",
"gruntfuggly.todo-tree",
"eamodio.gitlens",
"github.vscode-pull-request-github"
]
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY . /app

ADD scripts/setup.sh /app/setup.sh

# Install pip requirements
COPY pyproject.toml .
RUN chmod +x setup.sh && ./setup.sh

RUN apt-get update &&\
apt-get install ffmpeg libsm6 libxext6 -y &&\
apt install libgl1-mesa-glx &&\
apt install build-essential -y --no-install-recommends &&\
apt-get install make &&\
apt-get install python3-pip -y --no-install-recommends &&\
pip3 install poetry

# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser

# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["make"]

0 comments on commit 9d27b94

Please sign in to comment.