I'm trying to run php-fpm in gitpod.io.
But when I run following command...
service php7.1-fpm start
...Gitpod console return a permission error, I can't use sudo in gitpod console.
What can i do to fix that issue.
Error:> mkdir: cannot create directory ‘/run/php’: Permission denied . That error are show in my gitpod console
My dockerfile :
FROM gitpod/workspace-full:latest
# optional: use a custom Nginx config.
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./docker-run.sh /
# optional: change document root folder. It's relative to your git working copy.
ENV NGINX_DOCROOT_IN_REPO="www"
USER root
RUN apt-get update \
&& apt-get -y install mysql-server mysql-client \
&& apt-get -y install php-fpm php-cli php-bz2 php-bcmath php-gmp php-imap php-shmop php-soap php-xmlrpc php-xsl php-ldap \
&& apt-get -y install php-amqp php-apcu php-imagick php-memcached php-mongodb php-oauth php-redis\
&& apt-get clean && rm -rf /var/cache/apt/* /var/lib/apt/lists/* /tmp/*
RUN mkdir /var/run/mysqld \
&& chown -R gitpod:gitpod /var/run/mysqld /usr/share/mysql /var/lib/mysql /var/log/mysql /etc/mysql
COPY ./my.cnf /etc/mysql/my.cnf
RUN mysqld --daemonize --skip-grant-tables \
&& sleep 3 \
&& ( mysql -uroot -e "USE mysql; UPDATE user SET authentication_string=PASSWORD(\"root\") WHERE user='root'; UPDATE user SET plugin=\"mysql_native_password\" WHERE user='root'; FLUSH PRIVILEGES;" ) \
&& mysqladmin -uroot -proot shutdown;
EXPOSE 80 443
Sorry for my english is verry bad.