This repository has been archived by the owner on Apr 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
61 lines (51 loc) · 1.55 KB
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Visual Studio Code in a container
# some of the code copied from https://github.com/jessfraz/dockerfiles/blob/master/vscode/Dockerfile
FROM php:7.3
# Tell debconf to run in non-interactive mode
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
git \
--no-install-recommends
# Add the vscode debian repo
RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | apt-key add -
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
RUN apt-get update && apt-get -y install \
code \
libasound2 \
libatk1.0-0 \
libcairo2 \
libcups2 \
libexpat1 \
libfontconfig1 \
libfreetype6 \
libgtk2.0-0 \
libpango-1.0-0 \
libx11-xcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user \
&& mkdir /var/www/html -p \
&& chown -R user:user $HOME /var/www/html
# package vscode extension for PHP dev
ENV VSCODEEXT /var/vscode-ext
RUN mkdir $VSCODEEXT \
&& chown -R user:user $VSCODEEXT \
&& su user -c "code --extensions-dir $VSCODEEXT --install-extension felixfbecker.php-intellisense --install-extension felixfbecker.php-debug --install-extension whatwedo.twig --install-extension ikappas.phpcs"
COPY start.sh /usr/local/bin/start.sh
WORKDIR /var/www/html
CMD [ "start.sh" ]