-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 1.64 KB
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# base image tags available at https://mcr.microsoft.com/v2/devcontainers/universal/tags/list
# added the platform flag to override any local settings since this image is only compatible with linux/amd64. since this image is only x64 compatible, suppressing the hadolint rule
# hadolint ignore=DL3029
FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/universal:5.1.5-noble
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# temporary hack until yarn updates its GPG key
RUN rm /etc/apt/sources.list.d/yarn.list || true && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn-archive-keyring.gpg > /dev/null
RUN apt-get update -y && apt-get install -y \
"bash-completion=$(apt-cache madison bash-completion | awk '{print $3}' | grep '^1:2.11' | head -n 1)" --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create the workspace folders that have docker volume (see docker-compose.yaml) and set permissions for anyone to modify
# this is necessary to be able to break out these folders as a separate docker volume for better performance on Windows hosts
ARG REPO_NAME=copier-base-template
ENV VENV_PATH=/workspaces/${REPO_NAME}/backend/.venv
ENV PNPM_STORE=/workspaces/${REPO_NAME}/.pnpm-store
ENV FRONTEND_NODE_MODULES=/workspaces/${REPO_NAME}/frontend/node_modules
RUN mkdir -p /workspaces && \
mkdir -p ${VENV_PATH} && \
mkdir -p ${PNPM_STORE} && \
mkdir -p ${FRONTEND_NODE_MODULES} && \
chmod -R 777 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES} && \
chgrp -R 0 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES}
# SSH
EXPOSE 2222