-
Install Docker:
sudo pacman -S docker
-
Enable Docker systemctl unit:
- In WSL2 run:
sudo apt update
sudo apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils cpu-checker \
network-manager iptables-persistent linux-headers-generic \
qemu uml-utilities virt-manager git \
wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
tesseract-ocr-eng genisoimage vim net-tools screen firewalld libncurses-dev -y
sudo apt install virt-manager
sudo addgroup kvm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
index index.php index.html; | |
server_name _; | |
root /var/www/html/public; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
networks: | |
laravel: | |
services: | |
nginx: | |
build: | |
context: ./dockerfiles | |
dockerfile: nginx.dockerfile | |
args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:stable-alpine | |
ARG UID | |
ARG GID | |
ENV UID=${UID} | |
ENV GID=${GID} | |
RUN delgroup dialout |
Repositório do projeto: https://github.com/fdaciuk/conduit-api
Especificação da API: https://gothinkster.github.io/realworld/docs/specs/backend-specs/introduction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Stage - set up the ZSH environment for optimal developer experience | |
FROM alpine:latest AS setup | |
# Let scripts know we're running in Docker (useful for containerised development) | |
ENV RUNNING_IN_DOCKER true | |
# Use the unprivileged `main` user (created without a password ith `-D`) for safety | |
RUN adduser -D main | |
RUN mkdir -p /app \ | |
&& chown -R main:main /app | |
# Set up ZSH and our preferred terminal environment for containers | |
RUN apk --no-cache add zsh curl git |
MySql Client:
The mysql-client
package allows you to connect to a MySQL server. It will give you the mysql
command-line program.
MySql Server:
The mysql-server
package allows to run a MySQL server which can host multiple databases and process queries on those databases.
- Update Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That’s one of the real strengths of Docker: the ability to go back to a previous commit. The secret is simply to docker tag the image you want. | |
Here’s an example. In this example, I first installed ping, then committed, then installed curl, and committed that. Then I rolled back the image to contain only ping: | |
$ docker history imagename | |
IMAGE CREATED CREATED BY SIZE | |
f770fc671f11 12 seconds ago apt-get install -y curl 21.3 MB | |
28445c70c2b3 39 seconds ago apt-get install ping 11.57 MB | |
8dbd9e392a96 7 months ago 131.5 MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Needs Hibernate 5.2.11.Final | |
*/ | |
public List<ObjectNode> getQuery( | |
Integer anno, | |
Integer settimana) { | |
Query q = em.createNativeQuery( | |
"NATIVE SQL....",Tuple.class); |
NewerOlder