diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md deleted file mode 100644 index 640bee2..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# docker-sandbox \ No newline at end of file diff --git a/day3/prac2/docker-compose.yml b/day3/prac2/docker-compose.yml index d55059f..60a69ec 100644 --- a/day3/prac2/docker-compose.yml +++ b/day3/prac2/docker-compose.yml @@ -1 +1,27 @@ -# 코드를 추가해주세요 +name: compose-test +services: + webapp: + image: python:3.13-slim + container_name: flask-app + ports: + - "8080:5000" + volumes: + - ./app:/app + working_dir: /app + command: sh -c "pip install --no-cache-dir flask redis && python app.py" + depends_on: + redis: + condition: service_healthy + + redis: + image: redis:7.0 + container_name: redis-db + ports: + - "6379:6379" + volumes: + - ./data:/data + healthcheck: + test: [ 'CMD', 'redis-cli', 'ping' ] + interval: 5s + timeout: 3s + retries: 3 \ No newline at end of file diff --git a/day4/prac1/.DS_Store b/day4/prac1/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/day4/prac1/.DS_Store differ diff --git a/day4/prac1/Dockerfile b/day4/prac1/Dockerfile new file mode 100644 index 0000000..d3bf6f2 --- /dev/null +++ b/day4/prac1/Dockerfile @@ -0,0 +1,20 @@ +<<<<<<< HEAD +FROM golang:1.24 +WORKDIR /src +COPY ./main.go . +RUN go build -o /bin/hello ./main.go +CMD ["/bin/hello"] +======= +FROM golang:1.24 AS builder +WORKDIR /src +COPY ./main.go . +ARG TARGETOS=linux +ARG TARGETARCH=amd64 +ENV CGO_ENABLED=0 +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ + go build -ldflags="-s -w" -o hello main.go + +FROM scratch +COPY --from=builder /src/hello /hello +ENTRYPOINT ["/hello"] +>>>>>>> 77187a3 (single multi compare - 권지은) diff --git a/day4/prac1/Dockerfile.single b/day4/prac1/Dockerfile.single new file mode 100644 index 0000000..895c83e --- /dev/null +++ b/day4/prac1/Dockerfile.single @@ -0,0 +1,5 @@ +FROM golang:1.24 +WORKDIR /src +COPY ./main.go . +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/hello ./main.go +CMD ["/bin/hello"] diff --git a/day4/prac1/main.go b/day4/prac1/main.go new file mode 100644 index 0000000..b7d2a32 --- /dev/null +++ b/day4/prac1/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} diff --git a/day4/screenshot/compare 1.png b/day4/screenshot/compare 1.png new file mode 100644 index 0000000..e7fcf23 Binary files /dev/null and b/day4/screenshot/compare 1.png differ diff --git a/day4/screenshot/multi 1.png b/day4/screenshot/multi 1.png new file mode 100644 index 0000000..d1452a7 Binary files /dev/null and b/day4/screenshot/multi 1.png differ diff --git a/day4/screenshot/result 1.png b/day4/screenshot/result 1.png new file mode 100644 index 0000000..236cfb3 Binary files /dev/null and b/day4/screenshot/result 1.png differ diff --git a/day4/screenshot/single 1.png b/day4/screenshot/single 1.png new file mode 100644 index 0000000..0ecb645 Binary files /dev/null and b/day4/screenshot/single 1.png differ